jmanhype commited on
Commit
820874d
Β·
1 Parent(s): 30fab3d

Switch to pre-built anchorxia/musev base image with Space-specific configurations

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -68
Dockerfile CHANGED
@@ -1,72 +1,18 @@
1
- FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04
2
 
3
- # Prevent interactive prompts during package installation
4
- ENV DEBIAN_FRONTEND=noninteractive
 
 
 
5
 
6
- # Install system dependencies
7
- RUN apt-get update && apt-get install -y \
8
- python3.10 \
9
- python3.10-dev \
10
- python3-pip \
11
- git \
12
- wget \
13
- build-essential \
14
- g++ \
15
- && rm -rf /var/lib/apt/lists/*
16
 
17
- # Create a non-root user
18
- RUN useradd -m -s /bin/bash user
19
- USER user
20
- WORKDIR /home/user
21
 
22
- # Set up Python environment
23
- ENV PATH="/home/user/.local/bin:${PATH}"
24
- RUN python3.10 -m pip install --user --no-cache-dir --upgrade pip
25
-
26
- # Install conda
27
- RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh && \
28
- bash miniconda.sh -b -p /home/user/.conda && \
29
- rm miniconda.sh
30
- ENV PATH="/home/user/.conda/bin:${PATH}"
31
-
32
- # Create and activate conda environment
33
- RUN conda create -n musev python=3.10 -y
34
- SHELL ["conda", "run", "-n", "musev", "/bin/bash", "-c"]
35
-
36
- # Install specific versions of key packages
37
- RUN pip install --no-cache-dir \
38
- setuptools==65.5.1 \
39
- huggingface_hub==0.14.1 \
40
- transformers==4.30.2 \
41
- accelerate==0.20.3
42
-
43
- # Clone repositories
44
- RUN cd /home/user && \
45
- git clone https://github.com/jmanhype/MMCM.git && \
46
- git clone https://github.com/jmanhype/diffusers.git -b main && \
47
- git clone https://github.com/patrickvonplaten/controlnet_aux.git
48
-
49
- # Install dependencies
50
- RUN pip install --no-cache-dir openmim && \
51
- cd /home/user/MMCM && pip install --no-cache-dir -e . && \
52
- cd /home/user/diffusers && pip install --no-cache-dir -e . && \
53
- cd /home/user/controlnet_aux && pip install --no-cache-dir -e .
54
-
55
- # Clone and set up app
56
- RUN cd /home/user && \
57
- git clone https://github.com/jmanhype/MuseV.git app
58
-
59
- # Install remaining requirements
60
- COPY requirements.txt /home/user/
61
- RUN pip install --no-cache-dir -r /home/user/requirements.txt
62
-
63
- # Set up entrypoint
64
- COPY scripts/gradio/entrypoint.sh /home/user/
65
- RUN chmod +x /home/user/entrypoint.sh
66
-
67
- # Set environment variables
68
- ENV PYTHONPATH=/home/user/app:/home/user/app/MMCM:/home/user/app/diffusers/src:/home/user/app/controlnet_aux/src
69
-
70
- # Set working directory and entrypoint
71
- WORKDIR /home/user/app
72
- ENTRYPOINT ["/home/user/entrypoint.sh"]
 
1
+ FROM anchorxia/musev:1.0.0
2
 
3
+ #MAINTAINER η»΄ζŠ€θ€…δΏ‘ζ―
4
+ LABEL MAINTAINER="anchorxia"
5
+ LABEL Email="[email protected]"
6
+ LABEL Description="musev gpu runtime image, base docker is pytorch/pytorch:2.0.1-cuda11.7-cudnn8-devel"
7
+ ARG DEBIAN_FRONTEND=noninteractive
8
 
9
+ USER root
 
 
 
 
 
 
 
 
 
10
 
11
+ SHELL ["/bin/bash", "--login", "-c"]
 
 
 
12
 
13
+ RUN . /opt/conda/etc/profile.d/conda.sh \
14
+ && echo "source activate musev" >> ~/.bashrc \
15
+ && conda activate musev \
16
+ && conda env list \
17
+ && pip --no-cache-dir install cuid gradio==4.12 spaces
18
+ USER root