Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ycai
simbricks
Commits
3b0a0e1f
Unverified
Commit
3b0a0e1f
authored
Jan 20, 2025
by
Marvin Meiers
Browse files
docker: add docker image for SimBricks runners
parent
231117c4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
3 deletions
+40
-3
docker/Dockerfile.base
docker/Dockerfile.base
+2
-1
docker/Dockerfile.dist-worker
docker/Dockerfile.dist-worker
+1
-0
docker/Dockerfile.runner
docker/Dockerfile.runner
+16
-0
docker/rules.mk
docker/rules.mk
+8
-2
docker/run_runner.sh
docker/run_runner.sh
+13
-0
No files found.
docker/Dockerfile.base
View file @
3b0a0e1f
ARG REGISTRY=
ARG REGISTRY=
ARG TAG=:latest
ARG TAG=:latest
FROM ${REGISTRY}simbricks/simbricks-build${TAG}
FROM ${REGISTRY}simbricks/simbricks-build${TAG}
COPY . /simbricks
COPY
--chown=simbricks
. /simbricks
WORKDIR /simbricks
WORKDIR /simbricks
USER simbricks
RUN make -j `nproc` ENABLE_VERILATOR=y
RUN make -j `nproc` ENABLE_VERILATOR=y
RUN git submodule update --init sims/external/qemu \
RUN git submodule update --init sims/external/qemu \
&& make -j `nproc` sims/external/qemu/ready \
&& make -j `nproc` sims/external/qemu/ready \
...
...
docker/Dockerfile.dist-worker
View file @
3b0a0e1f
ARG REGISTRY=
ARG REGISTRY=
ARG TAG=:latest
ARG TAG=:latest
FROM ${REGISTRY}simbricks/simbricks${TAG}
FROM ${REGISTRY}simbricks/simbricks${TAG}
USER root
RUN apt-get update \
RUN apt-get update \
&& apt-get install -y \
&& apt-get install -y \
openssh-server \
openssh-server \
...
...
docker/Dockerfile.runner
0 → 100644
View file @
3b0a0e1f
ARG REGISTRY=
ARG TAG=:latest
FROM ${REGISTRY}simbricks/simbricks${TAG}
WORKDIR /simbricks
RUN sudo pip install -r requirements.txt
RUN make -j `nproc` symphony-build
RUN sudo pip install symphony/utils/dist/simbricks_utils-*-py2.py3-none-any.whl \
symphony/orchestration/dist/simbricks_orchestration-*-py2.py3-none-any.whl \
symphony/client/dist/simbricks_client-*-py2.py3-none-any.whl \
symphony/cli/dist/simbricks_cli-*-py2.py3-none-any.whl \
symphony/runtime/dist/simbricks_runtime-*-py2.py3-none-any.whl \
symphony/runner/dist/simbricks_runner-*-py2.py3-none-any.whl \
symphony/local/dist/simbricks_local-*-py2.py3-none-any.whl
COPY ./run_runner.sh /usr/local/bin
ENTRYPOINT ["/usr/local/bin/run_runner.sh"]
\ No newline at end of file
docker/rules.mk
View file @
3b0a0e1f
...
@@ -61,11 +61,17 @@ docker-images: $(REQUIREMENTS_TXT)
...
@@ -61,11 +61,17 @@ docker-images: $(REQUIREMENTS_TXT)
--build-arg
=
"REGISTRY=
$(DOCKER_REGISTRY)
"
\
--build-arg
=
"REGISTRY=
$(DOCKER_REGISTRY)
"
\
--build-arg
=
"TAG=
$(DOCKER_TAG)
"
\
--build-arg
=
"TAG=
$(DOCKER_TAG)
"
\
-f
docker/Dockerfile.min docker
-f
docker/Dockerfile.min docker
# The simbricks-dist-worker should be obsolete now and can be removed
# docker build -t \
# $(DOCKER_REGISTRY)simbricks/simbricks-dist-worker$(DOCKER_TAG) \
# --build-arg="REGISTRY=$(DOCKER_REGISTRY)" \
# --build-arg="TAG=$(DOCKER_TAG)" \
# -f docker/Dockerfile.dist-worker docker
docker
build
-t
\
docker
build
-t
\
$(DOCKER_REGISTRY)
simbricks/simbricks-
dist-work
er
$(DOCKER_TAG)
\
$(DOCKER_REGISTRY)simbricks/simbricks-
runn
er$(DOCKER_TAG)
\
--build-arg
=
"REGISTRY=
$(DOCKER_REGISTRY)
"
\
--build-arg
=
"REGISTRY=
$(DOCKER_REGISTRY)
"
\
--build-arg
=
"TAG=
$(DOCKER_TAG)
"
\
--build-arg
=
"TAG=
$(DOCKER_TAG)
"
\
-f
docker/Dockerfile.
dist-work
er docker
-f
docker/Dockerfile.
runn
er docker
docker-images-debug
:
docker-images-debug
:
docker build
-t
\
docker build
-t
\
...
...
docker/run_runner.sh
0 → 100755
View file @
3b0a0e1f
#!/bin/bash
namespace
=
$1
runner_id
=
$2
if
[[
"
$namespace
"
=
""
]]
||
[[
"
$runner_id
"
=
""
]]
;
then
echo
"Error: you need to specify both namespace and runner_id"
echo
"Usage: simbricks-runner NAMESPACE RUNNER_ID"
exit
1
fi
make convert-images-raw
NAMESPACE
=
"
$namespace
"
RUNNER_ID
=
"
$runner_id
"
exec
simbricks-runner
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment