Commit
·
38dfa43
1
Parent(s):
40e963c
Update Docker port
Browse files- Dockerfile +6 -5
Dockerfile
CHANGED
|
@@ -16,12 +16,13 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|
| 16 |
# Copy application code
|
| 17 |
COPY app/ ./app/
|
| 18 |
|
| 19 |
-
# Expose port
|
| 20 |
-
EXPOSE
|
| 21 |
|
| 22 |
# Set environment variables
|
| 23 |
-
ENV PYTHONUNBUFFERED=1
|
|
|
|
| 24 |
|
| 25 |
-
# Run the application
|
| 26 |
-
CMD ["
|
| 27 |
|
|
|
|
| 16 |
# Copy application code
|
| 17 |
COPY app/ ./app/
|
| 18 |
|
| 19 |
+
# Expose port expected by Hugging Face
|
| 20 |
+
EXPOSE 7860
|
| 21 |
|
| 22 |
# Set environment variables
|
| 23 |
+
ENV PYTHONUNBUFFERED=1 \
|
| 24 |
+
PORT=7860
|
| 25 |
|
| 26 |
+
# Run the application on the expected port
|
| 27 |
+
CMD ["sh", "-c", "uvicorn app.main:app --host 0.0.0.0 --port ${PORT}"]
|
| 28 |
|