WebashalarForML commited on
Commit
3bc7327
·
verified ·
1 Parent(s): a7f983b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -8
Dockerfile CHANGED
@@ -2,11 +2,11 @@ FROM python:3.9-slim-bullseye
2
 
3
  # Environment
4
  ENV PYTHONUNBUFFERED=1 \
5
- PORT=7860 \
6
 
7
  WORKDIR /app
8
 
9
- # Install system dependencies + LLVM 11 & build essentials
10
  RUN apt-get update && apt-get install -y --no-install-recommends \
11
  ffmpeg git curl \
12
  libgl1-mesa-glx libglib2.0-0 libsm6 libxrender1 libxext6 \
@@ -17,17 +17,17 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
17
  RUN pip install --upgrade pip
18
  RUN pip install numpy==1.21.6
19
 
20
- # Add gunicorn and app dependencies
21
- COPY requirements.txt .
22
  RUN pip install --no-cache-dir -r requirements.txt
23
 
24
- # Create necessary directories with appropriate permissions
25
- RUN mkdir -p /app/cache /app/uploads /app/results /app/checkpoints /app/temp && chmod -R 777 /app/cache /app/uploads /app/results /app/checkpoints /app/temp
26
- RUN chmod -R 777 /app
27
 
28
  # Copy application code
29
  COPY . .
30
 
31
  EXPOSE 7860
32
 
33
- CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]
 
2
 
3
  # Environment
4
  ENV PYTHONUNBUFFERED=1 \
5
+ PORT=7860
6
 
7
  WORKDIR /app
8
 
9
+ # Install system dependencies
10
  RUN apt-get update && apt-get install -y --no-install-recommends \
11
  ffmpeg git curl \
12
  libgl1-mesa-glx libglib2.0-0 libsm6 libxrender1 libxext6 \
 
17
  RUN pip install --upgrade pip
18
  RUN pip install numpy==1.21.6
19
 
20
+ # Install Gunicorn and app dependencies
21
+ COPY requirements.txt .
22
  RUN pip install --no-cache-dir -r requirements.txt
23
 
24
+ # Create necessary directories
25
+ RUN mkdir -p cache uploads results checkpoints temp \
26
+ && chmod -R 777 cache uploads results checkpoints temp
27
 
28
  # Copy application code
29
  COPY . .
30
 
31
  EXPOSE 7860
32
 
33
+ CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]