triflix commited on
Commit
824b6c6
·
verified ·
1 Parent(s): 992925b

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +24 -0
Dockerfile ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Copy requirements first for better caching
6
+ COPY requirements.txt .
7
+ RUN pip install --no-cache-dir -r requirements.txt
8
+
9
+ # Create necessary directories
10
+ RUN mkdir -p /app/templates /app/static /app/cache
11
+
12
+ # Copy application files
13
+ COPY main.py .
14
+ COPY templates/ ./templates/
15
+ COPY static/ ./static/
16
+
17
+ # Set environment variables
18
+ ENV PORT=7860
19
+
20
+ # Expose the port
21
+ EXPOSE 7860
22
+
23
+ # Command to run the application
24
+ CMD uvicorn main:app --host 0.0.0.0 --port 7860