Varsha Dewangan commited on
Commit
211d87b
·
1 Parent(s): abe1d60

updated requirements and docker file

Browse files
Files changed (2) hide show
  1. dockerfile +5 -6
  2. requirements.txt +1 -5
dockerfile CHANGED
@@ -1,7 +1,6 @@
1
  # Dockerfile
2
-
3
  # Use an official Python runtime as a parent image
4
- FROM python:3.11
5
 
6
  # Set the working directory in the container
7
  WORKDIR /app
@@ -20,8 +19,8 @@ COPY . .
20
  # Hugging Face Spaces requires port 7860
21
  EXPOSE 7860
22
 
23
- # Define environment variables if needed
24
- ENV FLASK_APP=app.py
25
 
26
- # Command to run your application
27
- CMD ["python", "app.py"]
 
1
  # Dockerfile
 
2
  # Use an official Python runtime as a parent image
3
+ FROM python:3.9
4
 
5
  # Set the working directory in the container
6
  WORKDIR /app
 
19
  # Hugging Face Spaces requires port 7860
20
  EXPOSE 7860
21
 
22
+ # Define environment variables if needed (FLASK_APP is not strictly needed with gunicorn CMD)
23
+ # ENV FLASK_APP=app.py
24
 
25
+ # Command to run your application using gunicorn with eventlet for SocketIO
26
+ CMD ["gunicorn", "--worker-class", "eventlet", "--bind", "0.0.0.0:7860", "app:app"]
requirements.txt CHANGED
@@ -4,13 +4,9 @@ torchvision
4
  flask
5
  flask_socketio
6
  pillow
7
- opencv-python
8
  transformers
9
  accelerate
10
- opencv-contrib-python
11
- ultralytics
12
  gunicorn
13
  python-engineio
14
- gevent-websocket
15
- opencv-python-headless
16
  eventlet
 
4
  flask
5
  flask_socketio
6
  pillow
 
7
  transformers
8
  accelerate
 
 
9
  gunicorn
10
  python-engineio
11
+ opencv-python-headless # Keep this one, remove opencv-python and opencv-contrib-python
 
12
  eventlet