Neon-AI commited on
Commit
779d4ed
·
verified ·
1 Parent(s): 32c5025

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -4
Dockerfile CHANGED
@@ -1,9 +1,26 @@
1
- FROM python:3.11-slim
 
2
 
 
3
  WORKDIR /app
4
 
5
- RUN pip install --no-cache-dir requests
 
 
 
6
 
7
- COPY app.py .
 
8
 
9
- CMD ["python", "app.py"]
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use official PyTorch image (CPU+CUDA ready)
2
+ FROM pytorch/pytorch:2.1.0-cuda11.8-cudnn8-runtime
3
 
4
+ # Set working directory
5
  WORKDIR /app
6
 
7
+ # Avoid Python buffering issues
8
+ ENV PYTHONUNBUFFERED=1
9
+ ENV HF_HOME=/app/huggingface
10
+ ENV HF_HUB_OFFLINE=0
11
 
12
+ # Install system dependencies
13
+ RUN apt-get update && apt-get install -y git curl wget && rm -rf /var/lib/apt/lists/*
14
 
15
+ # Install Python packages
16
+ COPY requirements.txt .
17
+ RUN pip install --no-cache-dir -r requirements.txt
18
+
19
+ # Copy app
20
+ COPY . .
21
+
22
+ # Expose Streamlit port
23
+ EXPOSE 8501
24
+
25
+ # Command to run Streamlit
26
+ CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]