knnn11 commited on
Commit
c0732e2
·
verified ·
1 Parent(s): 793b2b3

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -9
Dockerfile CHANGED
@@ -3,19 +3,17 @@ FROM python:3.10-slim
3
  # System dependencies
4
  RUN apt-get update && apt-get install -y \
5
  git \
6
- git-lfs \
7
  ffmpeg \
8
  libsm6 \
9
  libxext6 \
10
  libgl1-mesa-glx \
11
- && rm -rf /var/lib/apt/lists/* \
12
- && git lfs install
13
 
14
  # Create non-root user
15
  RUN useradd -m -u 1000 user
16
  WORKDIR /home/user/app
17
 
18
- # Install Python dependencies in single layer
19
  COPY requirements.txt .
20
  RUN pip install --no-cache-dir --upgrade pip && \
21
  pip install --no-cache-dir -r requirements.txt
@@ -24,14 +22,11 @@ RUN pip install --no-cache-dir --upgrade pip && \
24
  COPY --chown=1000:1000 . .
25
 
26
  # Environment variables
27
- ENV RUNPOD_ENDPOINT=${RUNPOD_ENDPOINT}
28
- ENV RUNPOD_API_KEY=${RUNPOD_API_KEY}
29
  ENV PORT=8000
30
  ENV GRADIO_PORT=7860
31
 
32
- # Switch to non-root user
33
  USER user
34
 
35
- EXPOSE 8000 7860
36
 
37
- CMD ["sh", "-c", "uvicorn app:app --host 0.0.0.0 --port $PORT"]
 
3
  # System dependencies
4
  RUN apt-get update && apt-get install -y \
5
  git \
 
6
  ffmpeg \
7
  libsm6 \
8
  libxext6 \
9
  libgl1-mesa-glx \
10
+ && rm -rf /var/lib/apt/lists/*
 
11
 
12
  # Create non-root user
13
  RUN useradd -m -u 1000 user
14
  WORKDIR /home/user/app
15
 
16
+ # Install Python dependencies
17
  COPY requirements.txt .
18
  RUN pip install --no-cache-dir --upgrade pip && \
19
  pip install --no-cache-dir -r requirements.txt
 
22
  COPY --chown=1000:1000 . .
23
 
24
  # Environment variables
 
 
25
  ENV PORT=8000
26
  ENV GRADIO_PORT=7860
27
 
 
28
  USER user
29
 
30
+ EXPOSE 8000
31
 
32
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]