HyperMehfin commited on
Commit
10f9b29
·
verified ·
1 Parent(s): 6c230d3

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -21
Dockerfile CHANGED
@@ -1,21 +1,21 @@
1
- # 1. Start with a lightweight Python image
2
- FROM python:3.10-slim
3
-
4
- # 2. Set the directory inside the cloud server
5
- WORKDIR /app
6
-
7
- # 3. Install required system libraries for OpenCV to work in the cloud
8
- RUN apt-get update && apt-get install -y libgl1-mesa-glx libglib2.0-0
9
-
10
- # 4. Copy your requirements file and install the Python libraries
11
- COPY requirements.txt .
12
- RUN pip install --no-cache-dir -r requirements.txt
13
-
14
- # 5. Copy all your project files (app.py, templates, models, etc.)
15
- COPY . .
16
-
17
- # 6. Hugging Face exposes port 7860 by default
18
- EXPOSE 7860
19
-
20
- # 7. Start the Flask server using Gunicorn (production-ready)
21
- CMD ["gunicorn", "-b", "0.0.0.0:7860", "--timeout", "120", "app:app"]
 
1
+ # 1. Start with a lightweight Python image
2
+ FROM python:3.10-slim
3
+
4
+ # 2. Set the directory inside the cloud server
5
+ WORKDIR /app
6
+
7
+ # 3. Install required system libraries for OpenCV to work in the cloud
8
+ RUN apt-get update && apt-get install -y libgl1-mesa-glx libglib2.0-0
9
+
10
+ # 4. Copy your requirements file and install the Python libraries
11
+ COPY requirements.txt .
12
+ RUN pip install --no-cache-dir -r requirements.txt
13
+
14
+ # 5. Copy all your project files (app.py, templates, models, etc.)
15
+ COPY . .
16
+
17
+ # 6. Hugging Face exposes port 7860 by default
18
+ EXPOSE 7860
19
+
20
+ # 7. Start the Flask server using Gunicorn (production-ready)
21
+ CMD ["gunicorn", "-b", "0.0.0.0:7860", "--timeout", "120", "server:app"]