Akwbw commited on
Commit
6795bc8
·
verified ·
1 Parent(s): 84505aa

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +24 -0
Dockerfile ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use the official Microsoft Playwright Python image (includes browsers)
2
+ FROM mcr.microsoft.com/playwright/python:v1.49.0-jammy
3
+
4
+ # Set working directory
5
+ WORKDIR /code
6
+
7
+ # Copy requirements and install python dependencies
8
+ COPY requirements.txt .
9
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
10
+
11
+ # Install the browsers (Chromium specifically for speed)
12
+ RUN playwright install chromium
13
+
14
+ # Copy the rest of the application
15
+ COPY . .
16
+
17
+ # Create a writable directory for cache/permissions if needed
18
+ RUN chmod -R 777 /code
19
+
20
+ # Expose the port Hugging Face expects
21
+ EXPOSE 7860
22
+
23
+ # Run the Flask app using Gunicorn
24
+ CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app", "--timeout", "120", "--workers", "1"]