Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +4 -2
Dockerfile
CHANGED
|
@@ -1,4 +1,3 @@
|
|
| 1 |
-
# Use an official Python runtime as a parent image
|
| 2 |
FROM python:3.9-slim
|
| 3 |
|
| 4 |
# Disable Python buffering for easier container logging
|
|
@@ -10,6 +9,9 @@ ENV XDG_CACHE_HOME=/tmp/.cache
|
|
| 10 |
ENV MPLCONFIGDIR=/tmp/matplotlib
|
| 11 |
ENV HF_HOME=/tmp/hf_home
|
| 12 |
|
|
|
|
|
|
|
|
|
|
| 13 |
# Set the working directory in the container
|
| 14 |
WORKDIR /app
|
| 15 |
|
|
@@ -39,4 +41,4 @@ COPY . /app
|
|
| 39 |
EXPOSE 8500
|
| 40 |
|
| 41 |
# Run the FastAPI application using uvicorn
|
| 42 |
-
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8500"]
|
|
|
|
|
|
|
| 1 |
FROM python:3.9-slim
|
| 2 |
|
| 3 |
# Disable Python buffering for easier container logging
|
|
|
|
| 9 |
ENV MPLCONFIGDIR=/tmp/matplotlib
|
| 10 |
ENV HF_HOME=/tmp/hf_home
|
| 11 |
|
| 12 |
+
# Optional: Force Transformers to use slow tokenizers
|
| 13 |
+
ENV TRANSFORMERS_NO_FAST=1
|
| 14 |
+
|
| 15 |
# Set the working directory in the container
|
| 16 |
WORKDIR /app
|
| 17 |
|
|
|
|
| 41 |
EXPOSE 8500
|
| 42 |
|
| 43 |
# Run the FastAPI application using uvicorn
|
| 44 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8500"]
|