Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +6 -4
Dockerfile
CHANGED
|
@@ -8,7 +8,6 @@ WORKDIR /code
|
|
| 8 |
ENV HF_HOME /code/.cache
|
| 9 |
|
| 10 |
# Create the cache directory and make it fully writable.
|
| 11 |
-
# This is a simpler and more direct fix for the permission error.
|
| 12 |
RUN mkdir -p /code/.cache && chmod -R 777 /code/.cache
|
| 13 |
|
| 14 |
# Copy and install requirements
|
|
@@ -18,6 +17,9 @@ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
|
| 18 |
# Copy application code
|
| 19 |
COPY ./app.py /code/app.py
|
| 20 |
|
| 21 |
-
#
|
| 22 |
-
|
| 23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
ENV HF_HOME /code/.cache
|
| 9 |
|
| 10 |
# Create the cache directory and make it fully writable.
|
|
|
|
| 11 |
RUN mkdir -p /code/.cache && chmod -R 777 /code/.cache
|
| 12 |
|
| 13 |
# Copy and install requirements
|
|
|
|
| 17 |
# Copy application code
|
| 18 |
COPY ./app.py /code/app.py
|
| 19 |
|
| 20 |
+
# --- *** THE ONLY CHANGE IS THE PORT NUMBER *** ---
|
| 21 |
+
# Expose the port Hugging Face Spaces expects
|
| 22 |
+
EXPOSE 7860
|
| 23 |
+
|
| 24 |
+
# Run the application on port 7860
|
| 25 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|