Terence9 commited on
Commit
d7e5b1d
·
verified ·
1 Parent(s): c946103

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -0
Dockerfile ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official Python runtime as a parent image
2
+ FROM python:3.10-slim
3
+
4
+ # Set the working directory in the container
5
+ WORKDIR /code
6
+
7
+ # Copy requirements.txt and install dependencies
8
+ COPY requirements.txt .
9
+ RUN pip install --no-cache-dir -r requirements.txt
10
+
11
+ # Copy the rest of your application code
12
+ COPY . .
13
+
14
+ # Expose the port (7860 is the default for Hugging Face Spaces, change if needed)
15
+ EXPOSE 7860
16
+
17
+ # Set environment variable for Flask (if using Flask)
18
+ ENV FLASK_APP=app.py
19
+
20
+ # Start the app (adjust if you use FastAPI, etc.)
21
+ CMD ["flask", "run", "--host=0.0.0.0", "--port=7860"]