Spaces:
Sleeping
Sleeping
vancyferns commited on
Commit ·
583097f
1
Parent(s): 7655a55
updated dockerfile
Browse files- Dockerfile +7 -3
Dockerfile
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
# Use a lightweight official Python image as the base
|
| 2 |
FROM python:3.10-slim
|
| 3 |
|
| 4 |
-
# Install system-level dependencies for computer vision libraries
|
| 5 |
RUN apt-get update && apt-get install -y \
|
| 6 |
libgl1 \
|
| 7 |
libglib2.0-0 \
|
|
@@ -36,5 +36,9 @@ COPY model/ .
|
|
| 36 |
# Expose the port where the Flask API will run
|
| 37 |
EXPOSE 7860
|
| 38 |
|
| 39 |
-
#
|
| 40 |
-
CMD
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# Use a lightweight official Python image as the base
|
| 2 |
FROM python:3.10-slim
|
| 3 |
|
| 4 |
+
# Install system-level dependencies for computer vision libraries
|
| 5 |
RUN apt-get update && apt-get install -y \
|
| 6 |
libgl1 \
|
| 7 |
libglib2.0-0 \
|
|
|
|
| 36 |
# Expose the port where the Flask API will run
|
| 37 |
EXPOSE 7860
|
| 38 |
|
| 39 |
+
# Use ENTRYPOINT to make the container run as a specific executable
|
| 40 |
+
# This is more reliable than CMD for a consistent startup
|
| 41 |
+
ENTRYPOINT ["python3", "-m", "gunicorn"]
|
| 42 |
+
|
| 43 |
+
# Define the default arguments for the ENTRYPOINT
|
| 44 |
+
CMD ["--bind", "0.0.0.0:7860", "app:app"]
|