FROM swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/pytorch/pytorch:2.5.1-cuda12.4-cudnn9-devel
RUN sed -i s@/archive.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.list
RUN sed -i s@/security.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.list
RUN apt-get update && apt-get install -y git
RUN git clone https://www.ghproxy.cn/https://github.com/bytedance-seed/BAGEL.git
WORKDIR BAGEL
RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt
RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple gradio huggingface_hub
RUN apt-get install -y libgl1-mesa-glx
RUN apt-get install -y libglib2.0-0
ENTRYPOINT ["python3", "app.py", "--server_name", "0.0.0.0"]