-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
36 lines (27 loc) · 874 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
# build stage
FROM python:3.10 AS builder
# # # install PDM
RUN pip3 install -U pip setuptools wheel
RUN pip3 install pdm
# # copy files
COPY pyproject.toml pdm.lock README.md /app/
# # install dependencies and project into the local packages directory
WORKDIR /app
RUN mkdir __pypackages__ && pdm install --prod --no-lock --no-editable
FROM pytorch/pytorch
# retrieve packages from build stage
ENV PYTHONPATH=/app/pkgs
COPY --from=builder /app/__pypackages__/3.10/lib /app/pkgs
RUN pip uninstall -y accelerate
RUN pip install accelerate
#create project files
COPY run.sh pyproject.toml pdm.lock README.md /app/
COPY map_generation/ /app/map_generation
# COPY models/stable_unet_init/ /app/models/stable_unet_init
WORKDIR /app
RUN pip3 install -e .
ARG src="data/tiles"
# for local data
# COPY ${src} ./data
VOLUME ./result_path
ENTRYPOINT ["/bin/bash", "run.sh"]