-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
35 lines (21 loc) · 871 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
FROM nixos/nix AS builder
WORKDIR /app
RUN mkdir -p /output/store
# Install batsim
RUN nix-env -f https://github.com/oar-team/nur-kapack/archive/master.tar.gz --profile /output/profile -iA batsim
# Copy all the run time dependencies into /output/store
RUN cp -va $(nix-store -qR /output/profile) /output/store
ENTRYPOINT [ "/bin/sh" ]
FROM python:3.10-slim AS builder2
WORKDIR /app
RUN apt update -y && apt install -y git && python -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
RUN pip install git+https://github.com/tanaxer01/batsim-py \
git+https://github.com/tanaxer01/GridGym \
torch gymnasium matplotlib
FROM python:3.10
COPY --from=builder /output/store /nix/store
COPY --from=builder /output/profile /usr/.local
COPY --from=builder2 /opt/venv /opt/venv
ENV PATH="/opt/venv/bin:/usr/.local/bin:$PATH"
CMD ["bash"]