Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +19 -6
Dockerfile
CHANGED
|
@@ -1,8 +1,21 @@
|
|
| 1 |
-
FROM
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
COPY requirements.txt .
|
|
|
|
| 5 |
RUN pip install -r requirements.txt
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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"]
|