ShamsKhan404 commited on
Commit
f05ef8d
·
verified ·
1 Parent(s): 2946e6d

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -17
Dockerfile CHANGED
@@ -1,33 +1,20 @@
1
- # Use the official Python image
2
  FROM python:3.10-slim
3
 
4
- # Set the working directory inside the container
5
  WORKDIR /app
6
 
7
- # Install required system dependencies
 
8
  RUN apt-get update && apt-get install -y --no-install-recommends \
9
  libglib2.0-0 \
10
  libsm6 \
11
  libxext6 \
12
  libxrender-dev \
13
- libgl1 \
14
- ffmpeg \
15
  && rm -rf /var/lib/apt/lists/*
16
 
17
- # Copy requirements first to leverage Docker cache
18
- COPY requirements.txt ./
19
-
20
- # Install Python dependencies
21
  RUN pip install --no-cache-dir -r requirements.txt
22
 
23
- # Copy the model to the correct location inside the container
24
- COPY model/RAFDB_Custom.h5 /app/model/RAFDB_Custom.h5
25
-
26
- # Copy the rest of the application files
27
  COPY . .
28
 
29
- # Expose port 7860 for Hugging Face Spaces
30
- EXPOSE 7860
31
 
32
- # Start the app with gunicorn
33
- CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]
 
 
1
  FROM python:3.10-slim
2
 
 
3
  WORKDIR /app
4
 
5
+ COPY requirements.txt ./
6
+
7
  RUN apt-get update && apt-get install -y --no-install-recommends \
8
  libglib2.0-0 \
9
  libsm6 \
10
  libxext6 \
11
  libxrender-dev \
 
 
12
  && rm -rf /var/lib/apt/lists/*
13
 
 
 
 
 
14
  RUN pip install --no-cache-dir -r requirements.txt
15
 
 
 
 
 
16
  COPY . .
17
 
18
+ EXPOSE 5000
 
19
 
20
+ CMD ["gunicorn", "--bind", "0.0.0.0:5000", "wsgi:app"]