kouki321 commited on
Commit
117ead1
·
verified ·
1 Parent(s): 414f5f4

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +19 -6
Dockerfile CHANGED
@@ -1,8 +1,21 @@
1
- FROM python:3.9
2
- WORKDIR /app
3
-
 
 
 
 
 
4
  COPY requirements.txt .
 
5
  RUN pip install -r requirements.txt
6
-
7
- COPY . .
8
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
 
 
 
 
 
 
1
+ FROM nvidia/cuda:12.1.0-runtime-ubuntu20.04
2
+
3
+ # Install system packages
4
+ RUN apt-get update && apt-get install -y \
5
+ python3 python3-pip git && \
6
+ ln -s /usr/bin/python3 /usr/bin/python
7
+
8
+ # Install Python libraries
9
  COPY requirements.txt .
10
+ RUN pip install --upgrade pip
11
  RUN pip install -r requirements.txt
12
+
13
+ # Copy the app
14
+ WORKDIR /app
15
+ COPY app.py .
16
+
17
+ # Expose the port required by Hugging Face Spaces or your own server
18
+ EXPOSE 7860
19
+
20
+ # Run FastAPI app
21
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]