heisbuba commited on
Commit
9c9aae7
·
verified ·
1 Parent(s): 0fbe9d7

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -0
Dockerfile ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use Python 3.9
2
+ FROM python:3.9
3
+
4
+ # Set working directory to /code
5
+ WORKDIR /code
6
+
7
+ # Copy the current directory contents into the container at /code
8
+ COPY . .
9
+
10
+ # Install requirements
11
+ RUN pip install --no-cache-dir -r requirements.txt
12
+
13
+ # Create a generic temporary directory for file processing
14
+ RUN mkdir -p /tmp
15
+ RUN chmod 777 /tmp
16
+
17
+ # Hugging Face Spaces listens on port 7860 by default
18
+ EXPOSE 7860
19
+
20
+ # Start the Flask app using Gunicorn
21
+ CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app"]