Vbhadiar commited on
Commit
4ed9b50
·
verified ·
1 Parent(s): 9601206

Upload Dockerfile with huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -4
Dockerfile CHANGED
@@ -1,5 +1,22 @@
1
- FROM python:3.10-slim
2
- COPY . /app
 
 
 
3
  WORKDIR /app
4
- RUN pip install -r requirements.txt
5
- CMD ["python", "app.py"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ # Base image
3
+ FROM python:3.11-slim
4
+
5
+ # Working directory
6
  WORKDIR /app
7
+
8
+ # Install system dependencies (optional but recommended)
9
+ RUN apt-get update && apt-get install -y --no-install-recommends build-essential && rm -rf /var/lib/apt/lists/*
10
+
11
+ # Copy dependency file and install Python packages
12
+ COPY requirements.txt .
13
+ RUN pip install --no-cache-dir -r requirements.txt
14
+
15
+ # Copy application code
16
+ COPY app.py .
17
+
18
+ # Expose Streamlit default port
19
+ EXPOSE 7860
20
+
21
+ # Run Streamlit app
22
+ CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]