Alovestocode commited on
Commit
2509d6b
·
verified ·
1 Parent(s): 4e24d26

Add Dockerfile for local development

Browse files
Files changed (1) hide show
  1. Dockerfile +33 -0
Dockerfile ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Dockerfile for Router Model API - ZeroGPU
2
+ # Supports both CPU and GPU (with nvidia-docker)
3
+
4
+ FROM python:3.10-slim
5
+
6
+ # Install system dependencies
7
+ RUN apt-get update && apt-get install -y \
8
+ build-essential \
9
+ git \
10
+ && rm -rf /var/lib/apt/lists/*
11
+
12
+ # Set working directory
13
+ WORKDIR /app
14
+
15
+ # Copy requirements first for better caching
16
+ COPY requirements.txt .
17
+
18
+ # Install Python dependencies
19
+ RUN pip install --no-cache-dir -r requirements.txt
20
+
21
+ # Copy application code
22
+ COPY app.py .
23
+
24
+ # Set environment variables
25
+ ENV PORT=7860
26
+ ENV PYTHONUNBUFFERED=1
27
+
28
+ # Expose port
29
+ EXPOSE 7860
30
+
31
+ # Run the application
32
+ CMD ["python", "app.py"]
33
+