Abs6187 commited on
Commit
b51af55
·
verified ·
1 Parent(s): bbc9bc6

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +36 -41
Dockerfile CHANGED
@@ -1,41 +1,36 @@
1
- FROM python:3.11-slim
2
-
3
- WORKDIR /app
4
-
5
- # Install system dependencies
6
- RUN apt-get update && apt-get install -y \
7
- build-essential \
8
- curl \
9
- git \
10
- ffmpeg \
11
- libsm6 \
12
- libxext6 \
13
- libfontconfig1 \
14
- libxrender1 \
15
- libgl1-mesa-glx \
16
- libglib2.0-0 \
17
- && rm -rf /var/lib/apt/lists/*
18
-
19
- # Copy requirements first for better caching
20
- COPY requirements.txt .
21
-
22
- # Install PyTorch CPU version first
23
- RUN pip install --no-cache-dir torch==2.0.1+cpu --index-url https://download.pytorch.org/whl/cpu
24
-
25
- # Install other Python dependencies
26
- RUN pip install --no-cache-dir -r requirements.txt
27
-
28
- # Copy application code
29
- COPY . .
30
-
31
- # Set environment variables
32
- ENV PYTHONUNBUFFERED=1
33
- ENV STREAMLIT_SERVER_HEADLESS=true
34
- ENV STREAMLIT_SERVER_ENABLE_CORS=false
35
- ENV STREAMLIT_SERVER_PORT=8501
36
-
37
- # Expose port
38
- EXPOSE 8501
39
-
40
- # Run the app
41
- CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
 
1
+ FROM python:3.11-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Install system dependencies
6
+ RUN apt-get update && apt-get install -y \
7
+ build-essential \
8
+ curl \
9
+ git \
10
+ ffmpeg \
11
+ libglib2.0-0 \
12
+ && rm -rf /var/lib/apt/lists/*
13
+
14
+ # Copy requirements first for better caching
15
+ COPY requirements.txt .
16
+
17
+ # Install PyTorch CPU version first
18
+ RUN pip install --no-cache-dir torch==2.0.1+cpu --index-url https://download.pytorch.org/whl/cpu
19
+
20
+ # Install other Python dependencies
21
+ RUN pip install --no-cache-dir -r requirements.txt
22
+
23
+ # Copy application code
24
+ COPY . .
25
+
26
+ # Set environment variables
27
+ ENV PYTHONUNBUFFERED=1
28
+ ENV STREAMLIT_SERVER_HEADLESS=true
29
+ ENV STREAMLIT_SERVER_ENABLE_CORS=false
30
+ ENV STREAMLIT_SERVER_PORT=8501
31
+
32
+ # Expose port
33
+ EXPOSE 8501
34
+
35
+ # Run the app
36
+ CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]