Gagan0141 commited on
Commit
224dffb
·
verified ·
1 Parent(s): 7d4016d

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -4
Dockerfile CHANGED
@@ -1,18 +1,27 @@
 
1
  FROM python:3.11.7-slim
2
 
3
  ENV PYTHONDONTWRITEBYTECODE=1
4
  ENV PYTHONUNBUFFERED=1
 
5
  WORKDIR /app
6
 
 
7
  RUN apt-get update && apt-get install -y --no-install-recommends \
8
  build-essential \
9
  && rm -rf /var/lib/apt/lists/*
10
 
 
11
  COPY requirements.txt .
12
- COPY . .
13
 
14
- RUN pip install --no-cache-dir -r requirements.txt gunicorn
 
 
 
 
15
 
16
- EXPOSE 5000
 
17
 
18
- CMD ["gunicorn", "--bind", "0.0.0.0:5000", "app:app"]
 
 
1
+ # Use Python 3.11.7
2
  FROM python:3.11.7-slim
3
 
4
  ENV PYTHONDONTWRITEBYTECODE=1
5
  ENV PYTHONUNBUFFERED=1
6
+
7
  WORKDIR /app
8
 
9
+ # Install OS dependencies
10
  RUN apt-get update && apt-get install -y --no-install-recommends \
11
  build-essential \
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
+ # Copy dependency list
15
  COPY requirements.txt .
 
16
 
17
+ # Install Python dependencies
18
+ RUN pip install --no-cache-dir -r requirements.txt
19
+
20
+ # Copy entire project
21
+ COPY . .
22
 
23
+ # Expose port required by HuggingFace
24
+ EXPOSE 7860
25
 
26
+ # Run Flask app on 0.0.0.0:7860 (HF requirement)
27
+ CMD ["python", "app.py"]