triflix commited on
Commit
e299866
·
verified ·
1 Parent(s): 413172e

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -0
Dockerfile ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use a minimal base image
2
+ FROM python:3.10-slim
3
+
4
+ # Set environment variables
5
+ ENV PORT 7860
6
+
7
+ # Set working directory
8
+ WORKDIR /app
9
+
10
+ # Copy files
11
+ COPY main.py .
12
+ COPY requirements.txt .
13
+
14
+ # Install dependencies
15
+ RUN pip install --no-cache-dir -r requirements.txt
16
+
17
+ # Expose the port for Hugging Face
18
+ EXPOSE 7860
19
+
20
+ # Start the FastAPI app
21
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]