대형 비디오 데이터 세트 (GB 100 개, 가까운 미래에 여러 TB가 될 수 있음)와 관련된 연구 프로젝트를 진행 중입니다. 나는 리눅스, sysadmin 및 서버 설정에 상당히 익숙하므로 나와 함께하시기 바랍니다. 꽤 많은 정보를 제공해 주셨고, 도움이 될만한 것이 있다면 알려주겠습니다.Docker, nginx 및 django를 사용하여 대용량 데이터 세트를 제공합니다.
$ sudo docker-compose build
postgres uses an image, skipping
Building django
Step 1 : FROM python:3.5-onbuild
# Executing 3 build triggers...
Step 1 : COPY requirements.txt /usr/src/app/
---> Using cache
Step 1 : RUN pip install --no-cache-dir -r requirements.txt
---> Using cache
Step 1 : COPY . /usr/src/app
ERROR: Service 'django' failed to build: Error processing tar file(exit status 1): write /usr/src/app/media/packages/video_3/video/video_3.mkv: no space left on device
: 나는 우분투, 도커 (w/고정 표시기-작성), nginx를, Python3.5 & 장고 1.10
큰 틱을 업로드하는 (60기가바이트) 데이터 세트는 다음과 같은 오류 리드를 사용하고
내 파일은 500GB 용량의 드라이브에 있으며 현재 데이터 세트는 약 60GB입니다.
발견 번호 this discussion on container size. 아마도 Docker를 오해하고있는 것 같지만 컨테이너 만이 아니라 볼륨이 커지 길 원한다고 생각합니다. 따라서 적절하지 않습니다. 또한 docker-compose를 사용하지 않으므로 현재 설정에서이를 구현하는 방법이 명확하지 않습니다.
this question의 도움으로 확실한 결과를 얻으려면 작은 테스트 세트로 정적 파일 & 미디어 파일을 제공 할 수 있습니다. (데이터가 ssh를 통해 두 컨테이너에 모두 나타나므로 django 컨테이너 또는 nginx 컨테이너에서 제공하는 경우 불분명 함)
이 대량의 데이터를 처리하려면 어떻게해야합니까? 나중에 추가 데이터를 업로드 할 수 있기를 원합니다. 볼륨을 항상 재구성하지 않고도이 작업을 수행 할 수있는 솔루션이 존재한다면 그것은 부풀어 오릅니다.
내 설정
디렉토리 구조
film_web
├── docker-compose.yml
├── Dockerfile
├── film_grammar
│ ├── #django code lives here
├── gunicorn_conf.py
├── media
│ ├── #media files live here
├── nginx
│ ├── Dockerfile
│ └── nginx.conf
├── requirements.txt
└── static
├── #static files live here
고정 표시기 - compose.yml
nginx:
build: ./nginx
volumes:
- ./media:/usr/src/app/film_grammar/media
- ./static:/usr/src/app/film_grammar/static
links:
- django
ports:
- "80:80"
volumes_from:
- django
django:
build: .
volumes:
- ./film_grammar:/usr/src/app/film_grammar
expose:
- "8000"
links:
- postgres
postgres:
image: postgres:9.3
film_web Dockerfile
From python:3.5-onbuild
ENV DJANGO_CONFIGURATION Docker
CMD ["gunicorn", "-c", "gunicorn_conf.py", "--chdir", "film_grammar", "fg.wsgi:application", "--reload"]
VOLUME /home/alexhall/www/film_web/static
VOLUME /home/alexhall/www/film_web/media
의 nginx Dockerfile :
FROM nginx
COPY nginx.conf /etc/nginx/nginx.conf
당신의 도움에 미리
worker_processes 1;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
server {
listen 80;
server_name film_grammar_server;
access_log /dev/stdout;
error_log /dev/stdout info;
location /static {
alias /usr/src/app/film_grammar/static/;
}
location /media {
alias /usr/src/app/film_grammar/media/;
}
location/{
proxy_pass http://django:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
}
}
}
감사 nginx.conf!
컨테이너에서 데이터를 꺼내고 _bind mounting_ 볼륨을 사용하여 데이터를 가져 오는 것이 좋습니다 ('docker run -v <호스트의 비디오 데이터 폴더> : <비디오 데이터 폴더>). – ronkot