# dnf module install container-tools -y # dnf install podman -y # dnf install podman-docker -y # dnf install podman-remote -y # dnf install podman-plugins -y
[devel_kubic_libcontainers_stable] name=Stable Releases of Upstream github.com/containers packages (CentOS_7) type=rpm-md baseurl=https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/CentOS_7/ gpgcheck=1 gpgkey=https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/CentOS_7/repodata/repomd.xml.key enabled=1
# yum install podman -y # yum install podman-docker -y # yum install podman-remote -y # yum install podman-plugins -y # podman --version podman version 3.0.1
adduser podman passwd podman chgrp podman /var/run/podman (再起動したら元に戻ってしまう) chmod g+rwxs /var/run/podman (同上) systemctl start podman.socket
[Unit] Description=Podman API Socket Documentation=man:podman-system-service(1) [Socket] ExecStartPre=/usr/bin/chgrp podman /var/run/podman ExecStartPre=/usr/bin/chmod g+rwxs /var/run/podman ListenStream=%t/podman/podman.sock SocketMode=0660 [Install] WantedBy=sockets.target
(base) # pip --no-cache install podman-compose
systemctl daemon-reload systemctl enable podman.socket systemctl start podman.socket
mkdir -p /var/lib/registry podman run --privileged -d --name registry -p 5000:5000 -v /var/lib/registry:/var/lib/registry --restart=always registry:2 vi /etc/containers/registries.conf registries に 'localhost:5000' を追加.最後が良い
podman tag localhost/jupyterhub/singleuser-ltids localhost:5000/jupyterhub/singleuser-ltids podman push localhost:5000/jupyterhub/singleuser-ltids --tls-verify=false
podman pull localhost:5000/jupyterhub/singleuser-ltids --tls-verify=false
/.config, ~/.local を消す.
git clone https://github.com/opencontainers/runc.git cd runc/ make make install
# getsebool -a | grep container # setsebool -P container_manage_cgroup on
podman run -d --net host -v /home/teacher/iseki:/home/iseki/ -v /mnt/datahdd:/extdata -w /home/iseki/ --hooks-dir /usr/share/containers/oci/hooks.d/ -e NVIDIA_VISIBLE_DEVICES=all docker.io/jupyterhub/singleuser jupyterhub-singleuser --NotebookApp.port=42868 --allow-root
podman run -d --net host -v /home/bob:/home/jovyan/home -v /mnt/datahdd:/exdata docker.io/jupyterhub/singleuser start-notebook.sh --NotebookApp.port=50377
podman run -d --net host -v /home/teacher/iseki:/home/iseki/ -w /home/iseki/ --env JUPYTERHUB_API_TOKEN=cf30aa5ab007444ca6462ff8c4decfec --env JPY_API_TOKEN=cf30aa5ab007444ca6462ff8c4decfec --env JUPYTERHUB_CLIENT_ID=jupyterhub-user-iseki --env JUPYTERHUB_HOST= --env JUPYTERHUB_OAUTH_CALLBACK_URL=/user/iseki/oauth_callback --env JUPYTERHUB_USER=iseki --env JUPYTERHUB_SERVER_NAME= --env JUPYTERHUB_API_URL=http://202.26.150.118:8081/hub/api --env JUPYTERHUB_ACTIVITY_URL=http://202.26.150.118:8081/hub/api/users/iseki/activity --env JUPYTERHUB_BASE_URL=/ --env JUPYTERHUB_SERVICE_PREFIX=/user/iseki/ --env GRANT_SUDO=no --env CHOWN_HOME=yes --env PRJCT_DIR=jupyter --env WORK_DIR=works --env COURSE_DIR=.courses --env NB_UMASK=0037 --env CONDA_DIR=/opt/conda --env TZ=JST-9 --env JUPYTER_ENABLE_LAB=yes --env JUPYTER_IMAGE_SPEC=docker.io/jupyterhub/singleuser -v /mnt/datahdd:/extdata --hooks-dir /usr/share/containers/oci/hooks.d/ -e NVIDIA_VISIBLE_DEVICES=all docker.io/jupyterhub/singleuser jupyterhub-singleuser --NotebookApp.port=42868 --allow-root --ip=0.0.0.0
podman run -d --net host -v /home/bob:/home/jovyan/home --env JUPYTERHUB_API_TOKEN=7807b43805c442f4b38b1a89855df831 --env JPY_API_TOKEN=7807b43805c442f4b38b1a89855df831 --env JUPYTERHUB_CLIENT_ID=jupyterhub-user-bob --env JUPYTERHUB_HOST= --env JUPYTERHUB_OAUTH_CALLBACK_URL=/user/bob/oauth_callback --env JUPYTERHUB_USER=bob --env JUPYTERHUB_SERVER_NAME= --env JUPYTERHUB_API_URL=http://202.26.150.118:8081/hub/api --env JUPYTERHUB_ACTIVITY_URL=http://202.26.150.118:8081/hub/api/users/bob/activity --env JUPYTERHUB_BASE_URL=/ --env JUPYTERHUB_SERVICE_PREFIX=/user/bob/ --env GRANT_SUDO=no --env CHOWN_HOME=yes --env PRJCT_DIR=jupyter --env WORK_DIR=works --env COURSE_DIR=.courses --env NB_UMASK=0037 --env CONDA_DIR=/opt/conda --env TZ=JST-9 --env JUPYTER_ENABLE_LAB=yes --env JUPYTER_IMAGE_SPEC=docker.io/jupyterhub/singleuser -v /mnt/datahdd:/exdata docker.io/jupyterhub/singleuser start-notebook.sh --NotebookApp.port=50377