diff --git a/docs/howto/oasis/install.md b/docs/howto/oasis/install.md index 08b4e6f1fda066fb77eaaea2f37aeb697585b3a8..ab2be63debe9ae2328c932d57440e7a8783f893a 100644 --- a/docs/howto/oasis/install.md +++ b/docs/howto/oasis/install.md @@ -36,9 +36,9 @@ curl localhost/nomad-oasis/alive - Open [http://localhost/nomad-oasis](http://localhost/nomad-oasis){:target="_blank"} in your browser. -To run NORTH (the NOMAD Remote Tools Hub), the `hub` container needs to run docker and +To run NORTH (the NOMAD Remote Tools Hub), the `north` container needs to run docker and the container has to be run under the docker group. You need to replace the default group -id `991` in the `docker-compose.yaml`'s `hub` section with your systems docker group id. +id `991` in the `docker-compose.yaml`'s `north` section with your systems docker group id. Run `id` if you are a docker user, or `getent group | grep docker` to find our your systems docker gid. The user id 1000 is used as the nomad user inside all containers. @@ -182,7 +182,7 @@ a version tag (format is `vX.X.X`, you find all releases [here](https://gitlab.m - All containers will be named `nomad_oasis_*`. These names can be used later to reference the container with the `docker` cmd. - The services are setup to restart `always`, you might want to change this to `no` while debugging errors to prevent indefinite restarts. - Make sure that the `PWD` environment variable is set. NORTH needs to create bind mounts that require absolute paths and we need to pass the current working directory to the configuration from the PWD variable (see hub service in the `docker-compose.yaml`). -- The `hub` service needs to run docker containers. We have to use the systems docker group as a group. You might need to replace `991` with your +- The `north` service needs to run docker containers. We have to use the systems docker group as a group. You might need to replace `991` with your systems docker group id. #### nomad.yaml @@ -555,7 +555,7 @@ An example file `~/.docker/config.json` could look like this. } ``` -Since not all used services respect proxy variables, one also has to change the docker compose config file `docker-compose.yaml` for elastic search to: +Since not all used services respect proxy variables, one also has to change the docker compose config file `docker-compose.yaml` for elastic search to: ```yaml hl_lines="7 8" elastic: diff --git a/docs/howto/oasis/plugins_install.md b/docs/howto/oasis/plugins_install.md index e4b515d21f7e6d9d0c844e8fb58ad19fe54d45c9..22870b30fa8c0af9d7381d04a5bb8db262578ea0 100644 --- a/docs/howto/oasis/plugins_install.md +++ b/docs/howto/oasis/plugins_install.md @@ -23,8 +23,14 @@ If you already have an existing NOMAD Oasis setup, or do not wish to use the tem ```Dockerfile FROM gitlab-registry.mpcdf.mpg.de/nomad-lab/nomad-fair:latest +# Switch to root user to install packages to the system with pip +USER root + # Install your plugin here, e.g.: RUN pip install git+https://<repository_url> + +# Remember to switch back to the 'nomad' user +USER nomad ``` Depending on how your plugin code is distributed, you have several options for the actual install steps: @@ -47,28 +53,17 @@ Depending on how your plugin code is distributed, you have several options for t RUN pip install nomad-example-schema-plugin --index-url https://gitlab.mpcdf.mpg.de/api/v4/projects/2187/packages/pypi/simple ``` -4. Copy plugin code from host machine: +4. Copy plugin folder from host machine. Note that the folder needs to be in the [Docker build context](https://docs.docker.com/build/building/context/): ```sh - RUN pip install build - - COPY \ - nomadschemaexample \ - tests \ - README.md \ - LICENSE \ - pyproject.toml \ - . - - RUN python -m build --sdist - - RUN pip install dist/nomad-schema-plugin-example-*.tar.gz + COPY <nomad-plugin-folder-name> <nomad-plugin-folder-name> + RUN cd <nomad-plugin-folder-name> && pip install . ``` The customized image can then be built like this: ``` -docker build -t nomad-with-plugins . --build-arg SETUPTOOLS_SCM_PRETEND_VERSION=<insert-nomad-version> +docker build -t nomad-with-plugins . ``` This will create a new image with the tag `nomad-with-plugins`, which you can use in your `docker-compose.yaml` file: