Help us understand the problem. What is going on with this article?

2. クラスター計算機で udocker を利用する: インストール編

More than 1 year has passed since last update.

udockerをインストールする

紹介編に引き続いてインストールの手順を書いてみる

githubにあるudockerのインストールマニュアルに従ってインストール

以上終わり

これだけではちょっとあれなので、マニュアルに従って説明

インストールの前に

次の事を確認してほしい

  • pythonが動作する
  • curlコマンドが動作する

具体的には次の様なコマンドを実行してエラーがでなければOK
$ に続いている文字列が入力したコマンド

$ python --version
Python 2.7.5
$ curl --version
curl 7.29.0 (x86_64-redhat-linux-gnu) libcurl/7.29.0 NSS/3.16.2.3 Basic ECC zlib/1.2.7 libidn/1.28 libssh2/1.4.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smtp smtps telnet tftp 
Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz 

念の為に書いておくけれど、実際には次の2つコマンドを実行してその結果と共に表示したもの

python --version
curl --version

動作しない時は、システム周りに詳しい知人又はシステムの管理者に相談するのがお勧め

インストール

$ curl https://raw.githubusercontent.com/indigo-dc/udocker/master/udocker.py > udocker
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  258k  100  258k    0     0   607k      0 --:--:-- --:--:-- --:--:--  606k
$ chmod u+rx ./udocker
$ ./udocker install
Info: installing 1.1.1
Info: installing from: https://cernbox.cern.ch/index.php/s/VC7GuVWA7mYRAiy/download
Error: in download: HTTP/1.1 500 Internal Server Error
Info: installing from: https://owncloud.indigo-datacloud.eu/index.php/s/AFImjw8ii0X72xf/download

./udocker install でErrorが出ている部分https://cernbox.cern.ch/index.php/s/VC7GuVWA7mYRAiy/downloadからのダウンロードは失敗しているけれども、次のhttps://owncloud.indigo-datacloud.eu/index.php/s/AFImjw8ii0X72xf/downloadからは正常にダウンロードできているという事なので、インストール手順はちゃんと実行できている
(環境によっては違った結果になる)

正常にインストールできたかhelpコマンドで確認

$ ./udocker help

        Syntax:
          udocker  <command>  [command_options]  <command_args>

        Commands:
          search <repo/image:tag>       :Search dockerhub for container images
          pull <repo/image:tag>         :Pull container image from dockerhub
          images                        :List container images
          create <repo/image:tag>       :Create container from a pulled image
          ps                            :List created containers
          rm  <container>               :Delete container
          run <container>               :Execute container
          inspect <container>           :Low level information on container
          name <container_id> <name>    :Give name to container
          rmname <name>                 :Delete name from container

          rmi <repo/image:tag>          :Delete image
          rm <container-id>             :Delete container
          import <tar> <repo/image:tag> :Import tar file (exported by docker)
          import - <repo/image:tag>     :Import from stdin (exported by docker)
          load -i <exported-image>      :Load image from file (saved by docker)
          load                          :Load image from stdin (saved by docker)
          export -o <tar> <container>   :Export container rootfs to file
          export - <container>          :Export container rootfs to stdin
          inspect <repo/image:tag>      :Return low level information on image
          verify <repo/image:tag>       :Verify a pulled image
          clone <container>             :duplicate container

          protect <repo/image:tag>      :Protect repository
          unprotect <repo/image:tag>    :Unprotect repository
          protect <container>           :Protect container
          unprotect <container>         :Unprotect container

          mkrepo <topdir>               :Create repository in another location
          setup                         :Change container execution settings
          login                         :Login into docker repository
          logout                        :Logout from docker repository

          help                          :This help
          run --help                    :Command specific help

        Options common to all commands must appear before the command:
          -D                            :Debug
          --quiet                       :Less verbosity
          --repo=<directory>            :Use repository at directory

        Examples:
          udocker search fedora
          udocker pull fedora
          udocker create --name=fed  fedora
          udocker run  fed  cat /etc/redhat-release
          udocker run --hostauth --hostenv --bindhome  fed
          udocker run --user=root  fed  yum install firefox
          udocker run --hostauth --hostenv --bindhome fed   firefox
          udocker run --hostauth --hostenv --bindhome fed   /bin/bash -i
          udocker run --user=root  fed  yum install cheese
          udocker run --hostauth --hostenv --bindhome --dri fed  cheese
          udocker --repo=/home/x/.udocker  images
          udocker -D run --user=1001:5001  fedora
          udocker export -o fedora.tar fedora
          udocker import fedora.tar myfedoraimage
          udocker create --name=myfedoracontainer myfedoraimage
          udocker export -o fedora_all.tar --clone fedora
          udocker import --clone fedora_all.tar

        Notes:
          * by default the following host directories are mounted in the
            container:
               /dev /proc /sys
               /etc/resolv.conf /etc/host.conf /etc/hostname
          * to prevent the mount of the above directories use:
               run  --nosysdirs  <container>
          * additional host directories to be mounted are specified with:
               run --volume=/data:/mnt --volume=/etc/hosts  <container>
               run --nosysdirs --volume=/dev --volume=/proc  <container>

        See: https://github.com/indigo-dc/udocker/blob/master/SUMMARY.md

インストールを確認した

今日はここまで:smiley:

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away