jmanhype commited on
Commit Β·
f0aa467
1
Parent(s): 820874d
Simplify Dockerfile to use anchorxia/musev base image with minimal Space requirements
Browse filesFiles changed (2)
- Dockerfile+44-10
- scripts/gradio/entrypoint.sh+6-11
123456789101112131415161718FROM anchorxia/musev:1.0.0#MAINTAINER η»΄ζ€θ δΏ‘ζ―LABEL MAINTAINER="anchorxia"LABEL Email="anchorxia@tencent.com"LABEL Description="musev gpu runtime image, base docker is pytorch/pytorch:2.0.1-cuda11.7-cudnn8-devel"ARG DEBIAN_FRONTEND=noninteractiveUSER rootSHELL ["/bin/bash", "--login", "-c"]RUN . /opt/conda/etc/profile.d/conda.sh \&& echo "source activate musev" >> ~/.bashrc \&& conda activate musev \&& conda env list \&& pip --no-cache-dir install cuid gradio==4.12 spacesUSER root12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152FROM anchorxia/musev:latest#MAINTAINER η»΄ζ€θ δΏ‘ζ―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"]# Set up a new user named "user" with user ID 1000RUN useradd -m -u 1000 user# Switch to the "user" userUSER user# Set home to the user's home directoryENV HOME=/home/user \PATH=/home/user/.local/bin:$PATH# Set the working directory to the user's home directoryWORKDIR $HOME/appRUN echo "docker start"\&& whoami \&& which python \&& pwdRUN git clone -b hg_space --recursive https://github.com/TMElyralab/MuseV.git# RUN mkdir ./MuseV/checkpoints \# && ls -l ./MuseVRUN chmod -R 777 /home/user/app/MuseV# RUN git clone -b main https://huggingface.co/TMElyralab/MuseV /home/user/app/MuseV/checkpointsRUN . /opt/conda/etc/profile.d/conda.sh \&& echo "source activate musev" >> ~/.bashrc \&& conda activate musev \&& conda env listRUN echo "export PYTHONPATH=\${PYTHONPATH}:/home/user/app/MuseV:/home/user/app/MuseV/MMCM:/home/user/app/MuseV/diffusers/src:/home/user/app/MuseV/controlnet_aux/src" >> ~/.bashrcWORKDIR /home/user/app/MuseV/scripts/gradio/# Add entrypoint scriptCOPY --chown=user entrypoint.sh ./entrypoint.shRUN chmod +x ./entrypoint.shRUN ls -l ./EXPOSE 7860# CMD ["/bin/bash", "-c", "python app.py"]CMD ["./entrypoint.sh"]
123456789101112131415161718192021#!/bin/bashecho "entrypoint.sh"whoami# Print Python locationwhich pythonecho "pythonpath :$PYTHONPATH"# Activate conda environmentconda activate musev# Print Python version and locationwhich pythonpython --version# Install any pending dependenciespip install --no-cache-dir -U openmim# Run the appcd /home/user/app12345678910111213141516#!/bin/bashecho "=== Starting MuseV Gradio App ==="whoami# Activate conda environmentsource /opt/conda/etc/profile.d/conda.shconda activate musev# Print environment infoecho "Python: $(which python)"echo "Python version: $(python --version)"echo "PYTHONPATH: $PYTHONPATH"# Run the appcd /home/user/app
Dockerfile+44-10
scripts/gradio/entrypoint.sh+6-11