Spaces:
Sleeping
Sleeping
FROM docker.io/library/python:3.10 | |
RUN apt-get update && apt-get install -y git git-lfs ffmpeg libsm6 libxext6 cmake libgl1-mesa-glx && rm -rf /var/lib/apt/lists/* && git lfs install | |
RUN pip install --no-cache-dir pip==22.3.1 && pip install --no-cache-dir datasets "huggingface-hub>=0.12.1" "protobuf<4" "click<8.1" "pydantic~=1.0" gradio[oauth]==3.44.1 uvicorn>=0.14.0 spaces==0.18.0 | |
WORKDIR /home/user/app | |
RUN useradd -m -u 1000 user | |
COPY --chown=1000 ./ /home/user/app | |
RUN if [ -f ./packages.txt ]; then \ | |
apt-get update && xargs -r -a ./packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/*; \ | |
else \ | |
echo "packages.txt not found!"; \ | |
fi | |
RUN if [ -f ./requirements.txt ]; then \ | |
pip install --no-cache-dir -r ./requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple; \ | |
else \ | |
echo "requirements.txt not found!"; \ | |
fi | |
ENV PYTHONUNBUFFERED=1 | |
EXPOSE 7860 | |
# ENTRYPOINT ["python", "app.py", "--server.port=7860", "--server.address=0.0.0.0"] | |