mattritchey commited on
Commit
7b5fade
·
verified ·
1 Parent(s): 93133c4

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +31 -0
Dockerfile ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use Python 3.9 slim image
2
+ FROM python:3.9-slim
3
+
4
+ # Set working directory
5
+ WORKDIR /app
6
+
7
+ # Install system dependencies
8
+ RUN apt-get update && apt-get install -y \
9
+ build-essential \
10
+ curl \
11
+ software-properties-common \
12
+ git \
13
+ && rm -rf /var/lib/apt/lists/*
14
+
15
+ # Copy requirements file
16
+ COPY requirements.txt .
17
+
18
+ # Install Python dependencies
19
+ RUN pip install --no-cache-dir -r requirements.txt
20
+
21
+ # Copy application files
22
+ COPY . .
23
+
24
+ # Expose port 7860 (required by Hugging Face Spaces)
25
+ EXPOSE 7860
26
+
27
+ # Health check
28
+ HEALTHCHECK CMD curl --fail http://localhost:7860/_stcore/health
29
+
30
+ # Run the application
31
+ CMD ["python", "app.py"]