KevinX-Penn28 commited on
Commit
798048d
·
verified ·
1 Parent(s): 4a31e34
Files changed (1) hide show
  1. Dockerfile +7 -9
Dockerfile CHANGED
@@ -1,10 +1,10 @@
1
  FROM nvidia/cuda:13.0.2-cudnn-devel-ubuntu24.04
2
  RUN useradd -m -u 1001 user
3
-
4
  # System deps
5
  RUN apt-get update && \
6
  apt-get install -y --no-install-recommends \
7
  python3 \
 
8
  python3-pip \
9
  git \
10
  build-essential \
@@ -14,15 +14,13 @@ RUN apt-get update && \
14
  libglib2.0-0 && \
15
  rm -rf /var/lib/apt/lists/*
16
 
17
- WORKDIR /app
18
-
19
- ENV PYTHONUNBUFFERED=1 \
20
- PIP_NO_CACHE_DIR=1
21
 
22
- # Copy & install Python deps
23
- COPY --chown=user requirements.txt requirements.txt
24
- RUN pip3 install --upgrade pip && \
25
- pip3 install --no-cache-dir -r requirements.txt
26
 
27
  # Copy rest of app source
28
  COPY --chown=user . .
 
1
  FROM nvidia/cuda:13.0.2-cudnn-devel-ubuntu24.04
2
  RUN useradd -m -u 1001 user
 
3
  # System deps
4
  RUN apt-get update && \
5
  apt-get install -y --no-install-recommends \
6
  python3 \
7
+ python3-venv \
8
  python3-pip \
9
  git \
10
  build-essential \
 
14
  libglib2.0-0 && \
15
  rm -rf /var/lib/apt/lists/*
16
 
17
+ # Create virtualenv
18
+ RUN python3 -m venv /opt/venv
19
+ ENV PATH="/opt/venv/bin:$PATH"
 
20
 
21
+ COPY --chown=user requirements.txt .
22
+ RUN pip install --upgrade pip && \
23
+ pip install --no-cache-dir -r requirements.txt
 
24
 
25
  # Copy rest of app source
26
  COPY --chown=user . .