aryan083 commited on
Commit
d8e4ba1
·
1 Parent(s): b8445fd

trying to fix 500

Browse files
Files changed (2) hide show
  1. Dockerfile +4 -4
  2. requirements.txt +1 -0
Dockerfile CHANGED
@@ -1,5 +1,5 @@
1
  # Base image with Python and necessary tools
2
- FROM python:3.12
3
 
4
  # Set the working directory in the container
5
  WORKDIR /app
@@ -11,8 +11,8 @@ COPY . /app
11
  # Install Python dependencies
12
  RUN pip install --no-cache-dir -r requirements.txt
13
 
14
- # Expose the port for the web server
15
- EXPOSE 7860
16
 
17
  # Command to run the application
18
- CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:7860", "app:app"]
 
1
  # Base image with Python and necessary tools
2
+ FROM python:3.12-slim
3
 
4
  # Set the working directory in the container
5
  WORKDIR /app
 
11
  # Install Python dependencies
12
  RUN pip install --no-cache-dir -r requirements.txt
13
 
14
+ ENV TRANSFORMERS_CACHE=/tmp
15
+ ENV PORT=7860
16
 
17
  # Command to run the application
18
+ CMD ["gunicorn", "app:app", "--bind", "0.0.0.0:7860", "--workers", "2"]
requirements.txt CHANGED
@@ -5,3 +5,4 @@ transformers==4.39.1
5
  tensorflow
6
  tf-keras
7
  gunicorn
 
 
5
  tensorflow
6
  tf-keras
7
  gunicorn
8
+ huggingface-hub