cwenger's picture
Update Dockerfile
1564563 verified
raw
history blame
978 Bytes
FROM ubuntu:22.04
RUN apt-get update
RUN apt-get install -y python3.10
RUN apt-get install python3-pip -y
RUN useradd -m -u 1001 user
RUN apt-get install -y git git-lfs ffmpeg libsm6 libxext6 cmake rsync libgl1-mesa-glx
RUN git lfs install
RUN --mount=target=/tmp/packages.txt,source=packages.txt apt-get update && xargs -r -a /tmp/packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/*
RUN --mount=target=/tmp/requirements.txt,source=requirements.txt pip install --no-cache-dir -r /tmp/requirements.txt
WORKDIR /home/user/app
RUN pip install --no-cache-dir pip==22.3.1 && pip install --no-cache-dir datasets "huggingface-hub>=0.19" "hf-transfer>=0.1.4" "protobuf<4" "click<8.1" "pydantic~=1.0"
RUN pip freeze > /tmp/freeze.txt
RUN pip install --no-cache-dir gradio[oauth]==4.38.1 "uvicorn>=0.14.0" spaces
COPY --link --chown=1000 ./ /home/user/app
#EXPOSE 7860
ENV GRADIO_SERVER_NAME="0.0.0.0"
ENV GRADIO_SERVER_PORT=7860
COPY app.py .
CMD ["python3", "app.py"]