-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (23 loc) · 707 Bytes
/
Dockerfile
File metadata and controls
32 lines (23 loc) · 707 Bytes
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
# The builder image, used to build the virtual environment
FROM pytorch/pytorch:2.2.2-cuda12.1-cudnn8-runtime
RUN pip install poetry==2.0.1
ENV POETRY_NO_INTERACTION=1 \
POETRY_VIRTUALENVS_IN_PROJECT=1 \
POETRY_VIRTUALENVS_CREATE=1 \
POETRY_CACHE_DIR=/tmp/poetry_cache \
PYTHONUNBUFFERED=1
WORKDIR /app
COPY pyproject.toml poetry.lock ./
#not really needed, but poetry seems to want it
RUN touch README.md
RUN poetry cache clear . --all
RUN poetry install --no-root && rm -rf $POETRY_CACHE_DIR
WORKDIR /app
ENV VIRTUAL_ENV=/app/.venv \
PATH="/app/.venv/bin:$PATH"
COPY main.py ./main.py
COPY config.yaml ./
COPY src ./src
COPY data ./data
COPY model ./model
CMD python main.py