Skip to content

Commit ee2a050

Browse files
committed
revise for docker build on sagemaker notebook and sagemaker studio
1 parent 579ea08 commit ee2a050

File tree

3 files changed

+2799
-324
lines changed

3 files changed

+2799
-324
lines changed

inference/generativeai/llm-workshop/lab12-hosting-controlnet-models-on-sagemaker/Dockerfile.inference

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@ FROM 763104351884.dkr.ecr.$REGION.amazonaws.com/pytorch-inference:2.0.1-gpu-py31
44
RUN apt update && apt install wget git libgl1-mesa-glx libcairo2-dev -y
55
RUN rm -rf /opt/conda/lib/python3.10/site-packages/opencv_python-4.6.0.dist-info/
66
RUN pip install opencv-python
7-
RUN pip install -U torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
8-
RUN pip install -U xformers --index-url https://download.pytorch.org/whl/cu118
7+
RUN pip install xformers==0.0.22.post7 --extra-index-url https://download.pytorch.org/whl/cu118
98
RUN pip install boto3 huggingface_hub triton deepspeed accelerate
109

1110
RUN mkdir -p /opt/ml/code
1211
WORKDIR /opt/ml/code
1312

14-
ADD https://api.github.com/repos/xieyongliang/stable-diffusion-webui/git/refs/heads/api-v1.6.0-reinvent2023 /opt/ml/webui.version.json
15-
RUN git clone https://github.com/xieyongliang/stable-diffusion-webui.git /opt/ml/code -b api-v1.6.0-reinvent2023
13+
ADD https://api.github.com/repos/xieyongliang/stable-diffusion-webui/git/refs/heads/api /opt/ml/webui.version.json
14+
RUN git clone https://github.com/xieyongliang/stable-diffusion-webui.git /opt/ml/code -b api
1615

1716
ADD https://api.github.com/repos/Mikubill/sd-webui-controlnet/git/refs/heads/main /opt/ml/controlnet.version.json
1817
RUN git clone https://github.com/Mikubill/sd-webui-controlnet.git /opt/ml/code/extensions/sd-webui-controlnet
@@ -22,6 +21,8 @@ RUN git clone https://github.com/xieyongliang/inpaint-anything.git /opt/ml/code/
2221

2322
RUN python launch.py -f --exit --skip-torch-cuda-test
2423
RUN pip install -U pytorch_lightning==1.6.5 pydantic==1.10.11 httpx==0.24.1
24+
RUN pip install -U torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu118
25+
2526
RUN rm requirements.txt
2627

2728
COPY serve /opt/ml/code

0 commit comments

Comments
 (0)