vhr1007
commited on
Commit
·
745dcf3
1
Parent(s):
2425701
hf errorse
Browse files- Dockerfile +17 -0
Dockerfile
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use the official Python 3.10.9 image
|
| 2 |
+
FROM python:3.10.9
|
| 3 |
+
|
| 4 |
+
# Set the working directory to /app
|
| 5 |
+
WORKDIR /app
|
| 6 |
+
|
| 7 |
+
# Create the cache directory
|
| 8 |
+
RUN mkdir -p /app/.cache/huggingface
|
| 9 |
+
|
| 10 |
+
# Copy the current directory contents into the container at /app
|
| 11 |
+
COPY . /app
|
| 12 |
+
|
| 13 |
+
# Install requirements.txt
|
| 14 |
+
RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt
|
| 15 |
+
|
| 16 |
+
# Start the FastAPI app on port 7860, the default port expected by Spaces
|
| 17 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|