speedartificialintelligence1122 commited on
Commit
171da0b
·
verified ·
1 Parent(s): 356ca95

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -13
Dockerfile CHANGED
@@ -1,18 +1,14 @@
1
- FROM python:3.9
2
 
3
- # Create non-root user
4
- RUN useradd -m -u 1000 user
5
- USER user
6
 
7
- # Set up path and working directory
8
- ENV PATH="/home/user/.local/bin:$PATH"
9
- WORKDIR /app
10
-
11
- # Copy files
12
- COPY --chown=user ./requirements.txt requirements.txt
13
- RUN pip install --no-cache-dir --upgrade -r requirements.txt
14
 
15
- COPY --chown=user . /app
 
 
16
 
17
- # Start server
18
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu20.04
2
 
3
+ # System setup
4
+ RUN apt-get update && apt-get install -y python3-pip git libgl1
 
5
 
6
+ # Python dependencies
7
+ COPY requirements.txt .
8
+ RUN pip3 install --upgrade pip && pip3 install -r requirements.txt
 
 
 
 
9
 
10
+ # App
11
+ COPY . /app
12
+ WORKDIR /app
13
 
 
14
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]