執筆中
version: "3.9"
services:
keras:
build:
context: .
dockerfile: Dockerfile-gpu
secrets:
- user_ssh_pub
- user_git_key
- user_git_config
ports:
- '2222:22'
volumes:
# $ sudo chown -R 5000:5000 /var/keras-data
- /var/keras-data:/home/aichan
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
# device_ids: ['0', '3']
capabilities: [ gpu ]
restart: always
postgres:
image: postgres:latest
container_name: postgres
user: 5050:5050
volumes:
# $ sudo chown -R 5050:5050 <host_directory>
- /var/pgsql-data/initdb.d/:/docker-entrypoint-initdb.d/
- /var/pgsql-data/data:/var/lib/postgresql/data
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: root
POSTGRES_INITDB_ARGS: "--encoding=UTF-8"
hostname: postgres
restart: always
pgadmin4:
image: dpage/pgadmin4:latest
container_name: pgadmin4
volumes:
# $ sudo chown -R 5050:5050 <host_directory>
- /var/pgadmin-data:/var/lib/pgadmin
environment:
PGADMIN_DEFAULT_EMAIL: root@example.com
PGADMIN_DEFAULT_PASSWORD: root
PGADMIN_DISABLE_POSTFIX: "False"
hostname: pgadmin4
depends_on:
- postgres
restart: always
secrets:
user_ssh_pub:
file: /home/atsushi/.ssh/id_rsa.pub
user_git_key:
file: /home/atsushi/.ssh/id_rsa.github
user_git_config:
file: /home/atsushi/.ssh/config