Mummia-99 commited on
Commit
0bba345
·
verified ·
1 Parent(s): a435d57

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -6
Dockerfile CHANGED
@@ -6,18 +6,18 @@ WORKDIR /app
6
  # Copy the necessary files
7
  COPY server.py requirements.txt ./
8
 
9
- # Install system dependencies
10
- RUN apt-get update && apt-get install -y build-essential \
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
- # Upgrade pip and install setuptools
14
- RUN pip install --upgrade pip setuptools
15
 
16
  # Install dependencies
17
  RUN pip install --no-cache-dir -r requirements.txt
18
 
19
- # Expose port 5000 for the API
20
- EXPOSE 5000
21
 
22
  # Run the application
23
  CMD ["python", "server.py"]
 
6
  # Copy the necessary files
7
  COPY server.py requirements.txt ./
8
 
9
+ # Install system dependencies required for Python packages
10
+ RUN apt-get update && apt-get install -y build-essential libffi-dev libssl-dev \
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
+ # Upgrade pip, setuptools, and wheel before installing dependencies
14
+ RUN pip install --upgrade pip setuptools wheel
15
 
16
  # Install dependencies
17
  RUN pip install --no-cache-dir -r requirements.txt
18
 
19
+ # Expose port 7860 (Hugging Face Spaces expects this)
20
+ EXPOSE 7860
21
 
22
  # Run the application
23
  CMD ["python", "server.py"]