triflix commited on
Commit
642ce32
·
verified ·
1 Parent(s): 823a130

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -0
Dockerfile ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official Python base image
2
+ FROM python:3.10-slim
3
+
4
+ # Set environment variables
5
+ ENV PORT 7860
6
+ ENV PYTHONDONTWRITEBYTECODE=1
7
+ ENV PYTHONUNBUFFERED=1
8
+
9
+ # Set working directory
10
+ WORKDIR /app
11
+
12
+ # Install dependencies
13
+ COPY requirements.txt .
14
+ RUN pip install fastapi uvicorn jinja2 requests
15
+
16
+ # Copy the app files
17
+ COPY . .
18
+
19
+ # Expose port for Hugging Face
20
+ EXPOSE 7860
21
+
22
+ # Run the app
23
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]