mic3333 commited on
Commit
fc8de7c
·
verified ·
1 Parent(s): e9673e4

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +25 -0
Dockerfile ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ WORKDIR /code
4
+
5
+ # Install system dependencies
6
+ RUN apt-get update && apt-get install -y \
7
+ gcc \
8
+ g++ \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
+ # Copy requirements first for better caching
12
+ COPY requirements.txt /code/requirements.txt
13
+
14
+ # Install Python dependencies
15
+ RUN pip install --no-cache-dir --upgrade pip
16
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
17
+
18
+ # Copy the application code
19
+ COPY . /code
20
+
21
+ # Expose port 7860 for Hugging Face Spaces
22
+ EXPOSE 7860
23
+
24
+ # Run the application
25
+ CMD ["python", "app.py"]