mgbam commited on
Commit
f1abbe6
·
verified ·
1 Parent(s): 8a252de

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -13
Dockerfile CHANGED
@@ -1,20 +1,21 @@
1
- # Use the official Python image from Docker Hub
2
  FROM python:3.10-slim
3
 
4
- # Set the working directory inside the container
5
- WORKDIR /app
6
 
7
- # Copy the requirements file into the container
8
- COPY requirements.txt .
9
 
10
- # Install Python dependencies
11
- RUN pip install --no-cache-dir -r requirements.txt
12
 
13
- # Copy the entire project into the container
14
- COPY . .
 
15
 
16
- # Expose the Flask port
17
- EXPOSE 5000
18
 
19
- # Command to run the Flask application
20
- CMD ["python", "app/app.py"]
 
1
+ # ---------- CryptoSentinel AI ----------
2
  FROM python:3.10-slim
3
 
4
+ # Faster installs & smaller image
5
+ ENV PIP_NO_CACHE_DIR=1 PYTHONDONTWRITEBYTECODE=1
6
 
7
+ # System deps for torch wheels on slim images
8
+ RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
9
 
10
+ COPY requirements.txt .
11
+ RUN pip install --upgrade pip && pip install -r requirements.txt
12
 
13
+ # Copy source
14
+ COPY app /app
15
+ WORKDIR /app
16
 
17
+ # Expose for Spaces (any port works; 7860 is convention)
18
+ EXPOSE 7860
19
 
20
+ # Use gunicorn+uvicorn worker for robustness
21
+ CMD ["gunicorn", "main:app", "-k", "uvicorn.workers.UvicornWorker", "-b", "0.0.0.0:7860", "--log-level=info"]