deepsafe commited on
Commit
1215c14
·
verified ·
1 Parent(s): be62999

sync from GitHub (28464ab)

Browse files
Files changed (1) hide show
  1. image/universal/Dockerfile +15 -12
image/universal/Dockerfile CHANGED
@@ -1,20 +1,23 @@
1
- FROM pytorch/pytorch:1.11.0-cuda11.3-cudnn8-runtime
 
 
 
2
 
3
  WORKDIR /app
4
 
5
- # Install git and wget
6
- RUN apt-get update && \
7
- apt-get install -y git wget && \
8
- apt-get clean && \
9
- rm -rf /var/lib/apt/lists/*
10
 
11
- # Copy requirements file
12
- COPY requirements.txt .
13
 
14
- # Install dependencies
15
- # Install dependencies
16
- RUN pip install uv && \
17
- uv pip install --system --no-cache-dir -r requirements.txt
 
 
 
18
 
19
  # Copy application code
20
  COPY app.py .
 
1
+ FROM nvidia/cuda:12.1.1-cudnn8-runtime-ubuntu22.04
2
+
3
+ ENV DEBIAN_FRONTEND=noninteractive
4
+ ENV PYTHONUNBUFFERED=1
5
 
6
  WORKDIR /app
7
 
8
+ RUN apt-get update && apt-get install -y --no-install-recommends \
9
+ python3 python3-pip git wget \
10
+ && rm -rf /var/lib/apt/lists/*
 
 
11
 
12
+ RUN ln -sf /usr/bin/python3 /usr/bin/python
 
13
 
14
+ # Install PyTorch with CUDA 12.1 (upgraded from 1.11/CUDA 11.3 for Blackwell support)
15
+ RUN pip install --no-cache-dir \
16
+ torch==2.5.1 torchvision==0.20.1 \
17
+ --index-url https://download.pytorch.org/whl/cu121
18
+
19
+ COPY requirements.txt .
20
+ RUN pip install --no-cache-dir -r requirements.txt
21
 
22
  # Copy application code
23
  COPY app.py .