bhavinmatariya commited on
Commit
d6c27f5
·
verified ·
1 Parent(s): 6bc6106

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +32 -33
Dockerfile CHANGED
@@ -1,33 +1,32 @@
1
- FROM python:3.10-slim
2
-
3
- # Install system dependencies
4
- RUN apt-get update && apt-get install -y \
5
- libgl1-mesa-glx \
6
- libglib2.0-0 \
7
- libsm6 \
8
- libxext6 \
9
- libxrender-dev \
10
- libgomp1 \
11
- && rm -rf /var/lib/apt/lists/*
12
-
13
- # Set working directory
14
- WORKDIR /app
15
-
16
- # Copy requirements first for better caching
17
- COPY requirements.txt .
18
-
19
- # Install Python dependencies
20
- RUN pip install --no-cache-dir -r requirements.txt
21
-
22
- # Copy application code
23
- COPY app.py .
24
-
25
- # Expose port (Hugging Face Spaces uses port 7860 by default)
26
- EXPOSE 7860
27
-
28
- # Set environment variables
29
- ENV PYTHONUNBUFFERED=1
30
-
31
- # Run the application
32
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
33
-
 
1
+ FROM python:3.10-slim
2
+
3
+ # Install system dependencies
4
+ RUN apt-get update && apt-get install -y \
5
+ libgl1 \
6
+ libglib2.0-0 \
7
+ libsm6 \
8
+ libxext6 \
9
+ libxrender-dev \
10
+ libgomp1 \
11
+ && rm -rf /var/lib/apt/lists/*
12
+
13
+ # Set working directory
14
+ WORKDIR /app
15
+
16
+ # Copy requirements first for better caching
17
+ COPY requirements.txt .
18
+
19
+ # Install Python dependencies
20
+ RUN pip install --no-cache-dir -r requirements.txt
21
+
22
+ # Copy application code
23
+ COPY app.py .
24
+
25
+ # Expose port (Hugging Face Spaces uses port 7860 by default)
26
+ EXPOSE 7860
27
+
28
+ # Set environment variables
29
+ ENV PYTHONUNBUFFERED=1
30
+
31
+ # Run the application
32
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]