File size: 674 Bytes
f11cb5f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM --platform=arm64 python:3.10

ARG GRADIO_SERVER_PORT=7860
ARG GRADIO_SERVER_NAME="0.0.0.0"

ENV PYTHONFAULTHANDLER=1 \
  PYTHONUNBUFFERED=1 \
  PYTHONHASHSEED=random \
  PIP_NO_CACHE_DIR=1 \
  PIP_DISABLE_PIP_VERSION_CHECK=1 \
  PIP_DEFAULT_TIMEOUT=100 \
  GRADIO_SERVER_PORT=${GRADIO_SERVER_PORT} \
  GRADIO_SERVER_NAME=${GRADIO_SERVER_NAME}

# Install Gradio dependency
RUN apt-get update && apt-get install -y ffmpeg

WORKDIR /app
COPY requirements.txt /app

# Strip out GPU packages as we will only use CPU
RUN sed -i '/nvidia\|triton/d' requirements.txt \
  && pip install -r requirements.txt

COPY . /app

EXPOSE $GRADIO_SERVER_PORT
CMD ["python", "/app/app.py"]