kohya-ss / kohya-ss/sd-scripts
Share my centos environment (docker) config.
- Dominant language
- Python
- Stars
- 7.2k
- Forks
- 1.2k
- Avg merge
- 11m
- Merged PRs (30d)
- 2
Description
```dockerfile
FROM xxx_cuda11-3-1-devel_x
# Conda
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh \
&& /bin/sh ~/miniconda.sh -b -p /opt/miniconda
ENV PATH=/opt/miniconda/bin:$PATH
# V ENV
RUN conda create -c https://xxxxx.xxx/anaconda/cloud/conda-forge/ --override --yes --name python310 python=3.10 \
&& source activate python310 \
&& pip install --no-cache-dir --upgrade pip setuptools wheel \
&& pip install --no-cache-dir torch==1.12.1+cu113 torchvision==0.13.1+cu113 -f https://download.pytorch.org/whl/torch_stable.html
# Download offline models
RUN mkdir -p /usr/local/models \
&& wget -O /usr/local/models/stable-diffusion--v1-5-pruned-emaonly.safetensors "http://xxxxx.xxx/temporary/v1-5-pruned-emaonly.safetensors" -q \
&& mkdir -p /usr/local/models/openai_clip-vit-large-patch14 \
&& wget -O /usr/local/openai--clip-vit-large-patch14.tgz "http://xxxxx.xxx/temporary/openai--clip-vit-large-patch14.tgz" -q \
&& tar -xzf /usr/local/openai--clip-vit-large-patch14.tgz -C /usr/local/models/openai_clip-vit-large-patch14 \
&& rm -rf /usr/local/openai--clip-vit-large-patch14.tgz
# FIX ImportError: libXext / libSM / libXrender
RUN yum install libXext libSM libXrender mesa-libGL -y \
&& rm -rf /var/cache/yum/*
# FIX OSError: /usr/lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found(required by bitsandbytes/libbitsandbytes_cuda113_nocublaslt.so)
RUN rm -rf /usr/lib64/libstdc++.so.6 \
&& ln -s /opt/miniconda/lib/libstdc++.so.6 /usr/lib64/libstdc++.so.6
# Download project
RUN mkdir -p /usr/local/application \
&& wget -O /usr/local/application.tgz "http://xxxxx.xxx/temporary/application.tgz" -q \
&& tar -xzf /usr/local/application.tgz -C /usr/local/application \
&& rm -rf /usr/local/application.tgz \
&& sed -i 's/openai\/clip-vit-large-patch14/\/usr\/local\/models\/openai_clip-vit-large-patch14/' /usr/local/application/sd-scripts/library/model_util.py \
&& source activate python310 \
&& cd /usr/local/application/sd-scripts \
&& pip install --no-cache-dir --upgrade -r requirements.txt \
&& pip install --no-cache-dir xformers \
# FIX ImportError: libGL.so.1
&& pip uninstall opencv-python -y && pip install --no-cache-dir opencv-python-headless==4.7.0.68
ENV ENV=development \
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/miniconda/lib/
```
You could not use bf6 because of `ValueError: bf16 mixed precision requires PyTorch >= 1.10 and a supported device.`. There is version of 1.9.0.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the embedded Dockerfile, especially the installation steps and the referenced /usr/local/application/sd-scripts/library/model_util.py and requirements.txt paths. Confirm what environment or documentation change is intended; done would require a clearly scoped, reproducible CentOS Docker configuration and a documented outcome for the stated PyTorch limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- centos, docker, python, pytorch
- Domain
- devops, machine-learning
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100