Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +9 -10
Dockerfile
CHANGED
|
@@ -1,16 +1,15 @@
|
|
| 1 |
-
|
| 2 |
-
# you will also find guides on how best to write your Dockerfile
|
| 3 |
|
| 4 |
-
|
|
|
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
ENV PATH="/home/user/.local/bin:$PATH"
|
| 9 |
|
| 10 |
-
|
|
|
|
| 11 |
|
| 12 |
-
|
| 13 |
-
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 14 |
|
| 15 |
-
|
| 16 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 1 |
+
FROM python:3.10-slim
|
|
|
|
| 2 |
|
| 3 |
+
# Install system dependencies
|
| 4 |
+
RUN apt-get update && apt-get install -y git
|
| 5 |
|
| 6 |
+
# Install Python dependencies
|
| 7 |
+
RUN pip install --no-cache-dir fastapi uvicorn transformers torch
|
|
|
|
| 8 |
|
| 9 |
+
# Copy app files
|
| 10 |
+
COPY app.py /app/app.py
|
| 11 |
|
| 12 |
+
WORKDIR /app
|
|
|
|
| 13 |
|
| 14 |
+
# Start FastAPI server
|
| 15 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|