rocky200416 commited on
Commit
77f1641
·
verified ·
1 Parent(s): b586698

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +25 -0
Dockerfile CHANGED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ # Set working directory
4
+ WORKDIR /app
5
+
6
+ # Install system dependencies (needed for some python packages)
7
+ RUN apt-get update && apt-get install -y \
8
+ build-essential \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
+ # Copy requirements and install
12
+ COPY requirements.txt .
13
+ RUN pip install --no-cache-dir -r requirements.txt
14
+
15
+ # Copy the rest of the app
16
+ COPY . .
17
+
18
+ # Create the database file if it doesn't exist (permission fix)
19
+ RUN touch food_logs.db && chmod 777 food_logs.db
20
+
21
+ # Expose the Hugging Face port
22
+ EXPOSE 7860
23
+
24
+ # Run the app
25
+ CMD ["python", "app.py"]