Coder Social home page Coder Social logo

Pillow 이슈 about do_it_django_a_to_z HOT 9 CLOSED

saintdragon2 avatar saintdragon2 commented on August 14, 2024
Pillow 이슈

from do_it_django_a_to_z.

Comments (9)

godseun avatar godseun commented on August 14, 2024 4

아. 그리고 책 너무 좋아요! 좋은책 내주셔서 감사합니다.

from do_it_django_a_to_z.

taegon avatar taegon commented on August 14, 2024 1

문제해결 경험과 후기 감사합니다.
환경 설정을 하다보면, 의존성이 꼬여서 문제가 되는 경우가 간혹 생깁니다.
말씀해주신 것처럼 가장 최신 버전보다는 한두버전 낮게 설정을 하시면 조금 더 안정적으로 환경을 설정할 수 있습니다.
다른 독자님들이 같은 문제로 어려움을 겪지 않도록 추가적인 정보를 공유할 수 있는 방안을 고민해보겠습니다.
고맙습니다.

from do_it_django_a_to_z.

taegon avatar taegon commented on August 14, 2024 1

@godseun 도커의 137번 에러코드는 여러가지 원인이 있겠지만, 가장 먼저 의심하는 원인은 메모리 부족현상입니다. aws 인스턴스를 리부팅 후 다시 해보시겠어요? 리부팅은 aws 웹에서도 쉽게 할 수 있고, ssh로 접속한 경우에는 reboot now와 같이 명령을 내릴 수도 있습니다.

재시동 후 다시 시도해보시고, 혹시 문제가 계속 발생하시면 원인 진단을 위해서 다른 방법들을 다시 시도해봐야겠습니다. 그리고 도커 설정에 따라 다른데, 재시작 후, 도커가 실행이 안 되고 있을 수 있습니다. 부팅 후 동일하게 도커 컴포즈 빌드를 했는데, 첨부하신 에러와 다른 에러가 발생하시면 이 부분도 의심해보세요.
sudo systemctl status docker로 상태를 확인하실 수 있고,
sudo systemctl start docker를 이용해서 서비스를 시작할 수 있습니다.

from do_it_django_a_to_z.

godseun avatar godseun commented on August 14, 2024

윈도우 10에서 도커로는 문제없이 빌드되었는데 우분투환경에서는 문제가 있는거같아요.
저자님이 쓰신 버전으로 다운그레이드해도 빌드가 안되더라구요 ㅠ

from do_it_django_a_to_z.

taegon avatar taegon commented on August 14, 2024

저희가 집필 당시에 여러 환경에서 테스트를 하고, 문제 없는 환경을 확인하고 작성하였음에도 부족함이 있었던 모양입니다. 저도 최근에 우분투 환경에서 다른 이유로 비슷한 문제를 경험하였기 때문에 godseun님이 겪은 환경이나 심정을 조금이나마 이해하고 있습니다. 혹시 문제가 발생한 환경과 docker file, requirement.txt 파일 등을 공유해 주시면, 제가 시간을 내어서 좀 더 살펴보도록 하겠습니다.

from do_it_django_a_to_z.

godseun avatar godseun commented on August 14, 2024
# Dockerfile
FROM python:3.9.0-alpine

WORKDIR /usr/src/app

ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1

RUN apk update
RUN apk add postgresql-dev gcc python3-dev musl-dev zlib-dev jpeg-dev 

COPY . /usr/src/app/

RUN pip install --upgrade pip
RUN pip install -r requirements.txt
# requirements.txt
asgiref==3.3.1
Django==3.1.5
gunicorn==20.0.4
Pillow==8.1
psycopg2==2.8.6
pytz==2020.5
sqlparse==0.4.1

환경은 aws lightsail - Ubuntu20.04 LTS 입니다!

from do_it_django_a_to_z.

taegon avatar taegon commented on August 14, 2024

@godseun 안녕하세요.
말씀해주신 환경을 맞추어서 테스트를 해보았는데, 제 환경에서는 에러가 재현이 안 되네요. 별 문제 없이 도커 이미지가 빌드가 되었습니다. 혹시 어떤 에러메시지가 발생하시나요?

from do_it_django_a_to_z.

godseun avatar godseun commented on August 14, 2024
Step 9/9 : RUN pip install -r requirements.txt
 ---> Running in 9578eaca1094
Collecting asgiref==3.3.1
  Downloading asgiref-3.3.1-py3-none-any.whl (19 kB)
Collecting Django==3.1.5
  Downloading Django-3.1.5-py3-none-any.whl (7.8 MB)
Collecting gunicorn==20.0.4
  Downloading gunicorn-20.0.4-py2.py3-none-any.whl (77 kB)
Collecting Pillow==8.1
  Downloading Pillow-8.1.0.tar.gz (44.9 MB)
ERROR: Service 'web' failed to build: The command '/bin/sh -c pip install -r requirements.txt' returned a non-zero code: 137

이렇게 뜨면서 안되네요...
도커버전 = Docker version 19.03.8
ubuntu version Welcome to Ubuntu 20.04 LTS (GNU/Linux 5.4.0-1018-aws x86_64)

from do_it_django_a_to_z.

godseun avatar godseun commented on August 14, 2024

감사합니다!

from do_it_django_a_to_z.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.