SalexAI commited on
Commit
bae2c03
·
verified ·
1 Parent(s): df2ee46

Create dockerfile

Browse files
Files changed (1) hide show
  1. dockerfile +30 -0
dockerfile ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official lightweight Python image
2
+ FROM python:3.10-slim
3
+
4
+ # Set environment variables
5
+ ENV PYTHONDONTWRITEBYTECODE=1
6
+ ENV PYTHONUNBUFFERED=1
7
+
8
+ # Set working directory
9
+ WORKDIR /app
10
+
11
+ # Install system dependencies (optional, add more if needed)
12
+ RUN apt-get update && apt-get install -y --no-install-recommends \
13
+ build-essential \
14
+ git \
15
+ && rm -rf /var/lib/apt/lists/*
16
+
17
+ # Copy requirements file if it exists
18
+ COPY requirements.txt .
19
+
20
+ # Install Python dependencies
21
+ RUN pip install --no-cache-dir -r requirements.txt
22
+
23
+ # Copy app files
24
+ COPY . .
25
+
26
+ # Expose the port that HF Spaces expects (default 7860 for Gradio, Streamlit, etc.)
27
+ EXPOSE 7860
28
+
29
+ # Command to run the app
30
+ CMD ["python", "app.py"]