vancyferns commited on
Commit
583097f
·
1 Parent(s): 7655a55

updated dockerfile

Browse files
Files changed (1) hide show
  1. 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 like OpenCV
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
- # Define the command to run the application using Gunicorn
40
- CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]
 
 
 
 
 
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"]