Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation of Plugin for NOMAD OASIS #6

Open
NiclRich opened this issue Aug 21, 2024 · 2 comments
Open

Installation of Plugin for NOMAD OASIS #6

NiclRich opened this issue Aug 21, 2024 · 2 comments

Comments

@NiclRich
Copy link

Hi everyone,

I try to install a plugin for Nomad OASIS, which is installed on my local machine. I use instructions described under Option 2 from here

I had to adjust the Dockerfile in order to let Docker to find the source code for the build and then I received the following error message:

[+] Building 9.6s (8/9)                                          docker:default
 => [internal] load build definition from Dockerfile                       0.0s
 => => transferring dockerfile: 322B                                       0.0s
 => [internal] load metadata for gitlab-registry.mpcdf.mpg.de/nomad-lab/n  0.0s
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
 => [1/5] FROM gitlab-registry.mpcdf.mpg.de/nomad-lab/nomad-fair:latest    0.0s
 => [internal] load build context                                          0.0s
 => => transferring context: 3.64kB                                        0.0s
 => CACHED [2/5] RUN pip install build                                     0.0s
 => CACHED [3/5] COPY     src/nomad_greenlightparser     tests     README  0.0s
 => ERROR [4/5] RUN python -m build --sdist                                9.5s
------                                                                          
 > [4/5] RUN python -m build --sdist:                                           
0.757 * Creating isolated environment: venv+pip...                              
0.769 * Installing packages in isolated environment:                            
7.017   - setuptools-scm>=8.0                                                   
7.017   - setuptools>=61.0.0                                                    
7.017 * Getting build dependencies for sdist...
9.311 running egg_info
9.311 error: error in 'egg_base' option: 'src' does not exist or is not a directory
9.398 
9.398 ERROR Backend subprocess exited when trying to invoke get_requires_for_build_sdist
------
Dockerfile:13
--------------------
  11 |         .
  12 |     
  13 | >>> RUN python -m build --sdist
  14 |     
  15 |     RUN pip install dist/nomad-schema-plugin-example-*.tar.gz
--------------------
ERROR: failed to solve: process "/bin/sh -c python -m build --sdist" did not complete successfully: exit code: 1

My dockerfile:

FROM gitlab-registry.mpcdf.mpg.de/nomad-lab/nomad-fair:latest

RUN pip install build

COPY \
    src/nomad_greenlightparser \
    tests \
    README.md \
    LICENSE \
    pyproject.toml \
    .

RUN python -m build --sdist

RUN pip install dist/nomad-schema-plugin-example-*.tar.gz

I run Nomad OASIS using the docker image downloaded from the Website on my Linux machine (POP! OS). Therefore I just can't build the package directly (that works) and install it via pip, since it uses another Python environment. So how do I install a Plugin originated from this template?

@blueraft
Copy link
Collaborator

The docs are unfortunately a bit out of date, can you try some of the methods described here

@NiclRich
Copy link
Author

Your proposed solution works for the command line tool, but I how do I install the plugin such that it can be seen in the GUI of NOMAD OASIS?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants