@@ -9,7 +9,7 @@ The OCCAM user interface is based on GitLab; we encourage use of the OCCAM GitLa
## Obtaining an account
You already have an account on the system, otherwise you would not be able to see this page.
In order to be able to connect via ssh on the access node, and for all the OCCAM machinery to know you, you still need to upload an ssh key to you user profile. Please go to https://occam-00.ph.unito.it/profile/keys. There you will find detailed instructions.
In order to be able to connect via ssh on the access node, and for all the OCCAM machinery to know you, you still need to upload an ssh key to you user profile. Please go to https://gitlab.c3s.unito.it/profile/keys. There you will find detailed instructions.
## Software containers
In OCCAM, all user software is run in *containers*. Even if this is not technically completely correct, you can think of a container as a lightweight virtual machine that holds the full software stack you need for your computation: OS, libraries, executables, files, except the Linux kernel that is shared with the physical host on which the container runs. Of course it is possible to pass configuration files and command line arguments to executables inside the container at runtime.
...
...
@@ -41,15 +41,15 @@ First, you will need to copy all the relevant files to a directory in your machi
If you're familiar with git, you can get both the files (script and Dockerfile) by cloning this project's repository:
Take your time to peruse the Dockerfile before building; it is described in some detail [here](dockerfile), and the full reference is at https://docs.docker.com/engine/reference/builder/.
In order to run on OCCAM, you need to upload the image to the image registry. To do so, you need to create a project on GitLab to hold the image (and possibly also all related files, if you choose to do so), by going to https://occam-00.ph.unito.it/projects/new and filling up the form: the project name must match the image name, so in this case it will be "docker-example".
In order to run on OCCAM, you need to upload the image to the image registry. To do so, you need to create a project on GitLab to hold the image (and possibly also all related files, if you choose to do so), by going to https://gitlab.c3s.unito.it/projects/new and filling up the form: the project name must match the image name, so in this case it will be "docker-example".
First you will need to login to the GitLab repository, using your OCCAM username and password:
```bash
docker login occam-00.ph.unito.it:5000
docker login gitlab.c3s.unito.it:5000
```
Then you can build it with a name including the registry name and push it:
If everything went well, you can go to the registry page at https://occam-00.ph.unito.it/\<username\>/docker-example/container_registry and you will see you image entry. It will be named "latest": you can add version tags to your containers like `<username>/docker-example:v1`, but the "latest" tag will always be an alias for the, well, latest version built.
If everything went well, you can go to the registry page at https://gitlab.c3s.unito.it/\<username\>/docker-example/container_registry and you will see you image entry. It will be named "latest": you can add version tags to your containers like `<username>/docker-example:v1`, but the "latest" tag will always be an alias for the, well, latest version built.
## Running on OCCAM
Now you can login on the access node (currently occam-01.ph.unito.it) and run your image on the cluster. If everything is set up correctly, your ssh key has already been propagated to your home directory on the system, and you should be able to log in without a password:
You will see some extra output generated by the machinery that re-builds the container in a special format and run it on one of the nodes. If you don't specify anything, like in the example above, it will use one of the "light" nodes that was set apart for testing.
```
Pulling bagnasco/docker-example from https://occam-00.ph.unito.it:5000...
Pulling bagnasco/docker-example from https://gitlab.c3s.unito.it:5000...
Creating container from bagnasco/docker-example...
New container ID for bagnasco/docker-example is 61516d71-1d0c-33fb-ac1f-83bca4b1846c
Running 61516d71-1d0c-33fb-ac1f-83bca4b1846c in /archive/home/bagnasco/docker-example