인프런 커뮤니티 질문&답변

dyryu님의 프로필 이미지

작성한 질문수

야, 너도 AI 서비스 만들 수 있어. [이미지 AI 서비스 서버리스 풀스택]

안녕하세요 도커파일 빌드 중 오류 질문드립니다.

해결된 질문

24.04.13 14:44 작성

·

397

·

수정됨

0

안녕하세요 강의 재밌게 잘 듣고 있습니다.

감사합니다.

 

제가 현재 15강 진행 중에 도커파일을 빌드하는 부분에 있는데요.

docker build -t raymong_lecture_serverless_ai .

다음 명령어를 실행시 아래와 같은 에러가 발생합니다.

 

 

[+] Building 113.3s (16/22) docker:desktop-linux

=> [internal] load .dockerignore 0.0s

=> => transferring context: 2B 0.0s

=> [internal] load build definition from Dockerfile 0.0s

=> => transferring dockerfile: 1.70kB 0.0s

=> [internal] load metadata for docker.io/pytorch/pytorch:1.11.0-cuda11.3-cudnn8-runtime 1.6s

=> [auth] pytorch/pytorch:pull token for registry-1.docker.io 0.0s

=> [ 1/18] FROM docker.io/pytorch/pytorch:1.11.0-cuda11.3-cudnn8-runtime@sha256:9904a7e081eaca29e3ee46afac87f2879676dd3bf7b5e9b8450454d84e074ef0 0.0s

=> [internal] load build context 0.0s

=> => transferring context: 757B 0.0s

=> CACHED [ 2/18] RUN apt-get update 0.0s

=> CACHED [ 3/18] RUN apt-get install -y git build-essential 0.0s

=> CACHED [ 4/18] RUN pip install -U --pre triton 0.0s

=> CACHED [ 5/18] RUN pip3 install --upgrade pip 0.0s

=> CACHED [ 6/18] ADD requirements.txt requirements.txt 0.0s

=> CACHED [ 7/18] RUN pip3 install -r requirements.txt 0.0s

=> CACHED [ 8/18] RUN pip3 install -U xformers --index-url https://download.pytorch.org/whl/cu113 0.0s

=> CACHED [ 9/18] ADD s3_file_manager.py . 0.0s

=> CACHED [10/18] ADD download.py . 0.0s

=> ERROR [11/18] RUN python3 download.py 111.6s

------

> [11/18] RUN python3 download.py:

2.806 The cache for model files in Transformers v4.22.0 has been updated. Migrating your old cache. This is a one-time only operation. You can interrupt this and resume the migration later on by calling `transformers.utils.move_cache()`.

0it [00:00, ?it/s]downloading reg images...

19.26

Fetching 11 files: 100%|██████████| 11/11 [01:12<00:00, 6.62s/it]

Loading pipeline components...: 83%|████████▎ | 5/6 [00:08<00:02, 2.11s/it]The installed version of bitsandbytes was compiled without GPU support. 8-bit optimizers, 8-bit multiplication, and GPU quantization are unavailable.

Loading pipeline components...: 100%|██████████| 6/6 [00:09<00:00, 1.53s/it]

101.2 You have disabled the safety checker for <class 'diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion.StableDiffusionPipeline'> by passing `safety_checker=None`. Ensure that you abide to the conditions of the Stable Diffusion license and do not expose unfiltered results in services or applications open to the public. Both the diffusers team and Hugging Face strongly recommend to keep the safety filter enabled in all public facing circumstances, disabling it only for use-cases that involve analyzing network behavior or auditing its results. For more information, please have a look at https://github.com/huggingface/diffusers/pull/254 .

111.6 Killed

------

Dockerfile:31

--------------------

29 | ADD s3_file_manager.py .

30 | ADD download.py .

31 | >>> RUN python3 download.py

32 |

33 | ADD convert_diffusers_to_original_stable_diffusion.py .

--------------------

ERROR: failed to solve: process "/bin/sh -c python3 download.py" did not complete successfully: exit code: 137

 

원인과 해결방법이 어떻게 될까요?

 

답변 1

0

배울장님의 프로필 이미지
배울장
지식공유자

2024. 04. 13. 15:13

안녕하세요! 캐시되어있는 걸 보니 여러번 시도해보신 것 같은데요, 지금 보내주신 내용으로는 저로썬 정확하게 원인 파악이 어려울 것 같습니다. 다운로드 하는데 꽤나 시간이 걸리는데 2분도 채 지나지 않아 killed 되는 것으로 보아 다운로드 도중에 해당 오류가 나타나는 것 같은데요.

혹시 1. 어떤 운영체제로 하고 계신지(윈도우 or 맥), 2. 하드웨어 램이 어느정도인지, 3. 디스크 여유공간은 어느정도 있으신지 추가적으로 정보를 주실 수 있을까요?

dyryu님의 프로필 이미지
dyryu
질문자

2024. 04. 14. 03:37

안녕하세요 빠른 답변 감사합니다.

  1. 맥북 에어 M2 로 작업 중에 있습니다.

  2. 램은 8GB 입니다.

  3. 디스크 사용가능 공간은 350GB 남아있습니다.

추가로 15강 강의자료에 있는 docker 빌드 명령어 실행중 위의 에러가 발생하였고, 도커파일을 빌드할 때 램을 확보해주면 나아질까 싶어 빌드 명령어에 --memory=4g 명령어를 추가하고 진행도 해봤으나, 같은 에러가 발생하였습니다.

배울장님의 프로필 이미지
배울장
지식공유자

2024. 04. 15. 00:51

저도 비슷한 환경을 구축해서 테스트 해보겠습니다.

추가적으로 101.2 초와 111.6초 Killed 사이에 어떤 작업이 이뤄지는지 알 수 있을까요?

dyryu님의 프로필 이미지
dyryu
질문자

2024. 04. 15. 19:58

안녕하세요 방금 전에 네트워크 환경을 바꾼 뒤 다시 빌드를 진행하였더니 이번에는 정상적으로 완료되었습니다. 남은 강의 이어서 잘 수강하도록 하겠습니다. 감사합니다!

dyryu님의 프로필 이미지

작성한 질문수

질문하기