-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (25 loc) · 797 Bytes
/
Dockerfile
File metadata and controls
38 lines (25 loc) · 797 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
33
34
35
36
37
38
FROM ubuntu:24.04 AS build
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 \
python3-pip \
python3-venv \
git \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
RUN python3 -m venv /app/venv
ENV PATH="/app/venv/bin:$PATH"
RUN pip install --no-cache-dir torch torchvision torchaudio \
--index-url https://download.pytorch.org/whl/cu129
FROM ubuntu:24.04 AS runtime
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 \
libgomp1 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY --from=build /app/venv /app/venv
COPY . .
ENV PATH="/app/venv/bin:$PATH"
ENV PYTHONUNBUFFERED=1
ENTRYPOINT ["python3", "engine/main.py"]