Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +6 -5
Dockerfile
CHANGED
|
@@ -38,11 +38,12 @@ RUN mkdir -p /app/static /app/temp && chmod -R 777 /app/static /app/temp
|
|
| 38 |
# Copy the rest of your application code into the container
|
| 39 |
COPY . /app
|
| 40 |
|
| 41 |
-
#
|
| 42 |
RUN chmod -R 777 /app
|
| 43 |
|
| 44 |
-
#
|
| 45 |
-
|
|
|
|
| 46 |
|
| 47 |
-
# Run the FastAPI application using uvicorn
|
| 48 |
-
CMD ["
|
|
|
|
| 38 |
# Copy the rest of your application code into the container
|
| 39 |
COPY . /app
|
| 40 |
|
| 41 |
+
# Set permissions for the entire /app directory (including fine_tuned_legal_qa)
|
| 42 |
RUN chmod -R 777 /app
|
| 43 |
|
| 44 |
+
# Set a default port; Hugging Face Spaces sets PORT automatically
|
| 45 |
+
ENV PORT=7860
|
| 46 |
+
EXPOSE 7860
|
| 47 |
|
| 48 |
+
# Run the FastAPI application using uvicorn on the dynamic port
|
| 49 |
+
CMD ["sh", "-c", "uvicorn app:app --host 0.0.0.0 --port ${PORT}"]
|