|
FROM anchorxia/musev:latest |
|
|
|
|
|
LABEL MAINTAINER="anchorxia, zhanchao" |
|
LABEL Email="anchorxia@tencent.com, zhanchao019@foxmail.com" |
|
LABEL Description="musev gradio image, from docker pull anchorxia/musev:latest" |
|
|
|
SHELL ["/bin/bash", "--login", "-c"] |
|
|
|
|
|
RUN useradd -m -u 1000 user |
|
|
|
|
|
USER user |
|
|
|
|
|
ENV HOME=/home/user \ |
|
PATH=/home/user/.local/bin:$PATH |
|
|
|
|
|
WORKDIR $HOME/app |
|
|
|
RUN echo "docker start"\ |
|
&& whoami \ |
|
&& which python \ |
|
&& pwd |
|
|
|
|
|
RUN git clone --recursive https://github.com/TMElyralab/MuseV.git && \ |
|
cd /home/user/app && \ |
|
git clone https://github.com/TMElyralab/MMCM.git && \ |
|
git clone https://github.com/TMElyralab/diffusers.git -b main && \ |
|
git clone https://github.com/TMElyralab/controlnet_aux.git -b tme |
|
|
|
RUN chmod -R 777 /home/user/app/MuseV |
|
|
|
|
|
RUN . /opt/conda/etc/profile.d/conda.sh && \ |
|
conda activate musev && \ |
|
pip install --no-cache-dir \ |
|
"huggingface_hub>=0.19.3" \ |
|
"transformers>=4.30.2" \ |
|
"accelerate>=0.20.3" \ |
|
"gradio>=4.12.0" \ |
|
"diffusers==0.21.4" \ |
|
spaces && \ |
|
cd /home/user/app/MMCM && pip install -e . && \ |
|
cd /home/user/app/diffusers && \ |
|
pip install --no-deps -e . && \ |
|
cd /home/user/app/controlnet_aux && pip install -e . |
|
|
|
RUN echo "source activate musev" >> ~/.bashrc |
|
|
|
|
|
ENV PYTHONPATH=/home/user/app/MuseV:/home/user/app/MMCM:/home/user/app/diffusers/src:/home/user/app/controlnet_aux/src |
|
|
|
WORKDIR /home/user/app/MuseV/scripts/gradio/ |
|
|
|
|
|
RUN printf '#!/bin/bash\n\ |
|
echo "=== Starting MuseV Gradio App ==="\n\ |
|
whoami\n\ |
|
source /opt/conda/etc/profile.d/conda.sh\n\ |
|
conda activate musev\n\ |
|
echo "Python: $(which python)"\n\ |
|
echo "Python version: $(python --version)"\n\ |
|
echo "PYTHONPATH: $PYTHONPATH"\n\ |
|
cd /home/user/app/MuseV/scripts/gradio\n\ |
|
python app_gradio_space.py' > entrypoint.sh && \ |
|
chmod +x entrypoint.sh |
|
|
|
EXPOSE 7860 |
|
|
|
ENTRYPOINT ["/bin/bash", "/home/user/app/MuseV/scripts/gradio/entrypoint.sh"] |