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

Documentation on how to " Run the model with Docker" #267

Open
yijianzeng opened this issue Oct 20, 2024 · 6 comments
Open

Documentation on how to " Run the model with Docker" #267

yijianzeng opened this issue Oct 20, 2024 · 6 comments
Assignees

Comments

@yijianzeng
Copy link
Contributor

@SarahAlidoost
Dear Sarah,
I was trying to use the workflow you developed to 'Run the model with Docker'. What i managed so far is the following:

  • Download Docker and install its desktop on Windows (AMD64 version)
  • Installed the Docker, and launched the Terminal directly within Docker Desktop
  • Used "docker pull ghcr.io/ecoextreml/stemmus_scope:latest", and after some time, i achieved the following:
PS C:\Users\yijian> docker pull ghcr.io/ecoextreml/stemmus_scope:latest
>> pwd
latest: Pulling from ecoextreml/stemmus_scope
4dac9f5215e8: Download complete
4f4fb700ef54: Download complete
511858ed31b9: Download complete
0b2fdd2bb55b: Download complete
5e822b74ebaa: Download complete
bd43c4e1840b: Download complete
113c6ad47548: Download complete
Digest: sha256:8ea0d981c783f9e04a6ad8fccb4a0964a95ddc07f29f3f7a7ed95bc1f415b176
Status: Downloaded newer image for ghcr.io/ecoextreml/stemmus_scope:latest
ghcr.io/ecoextreml/stemmus_scope:latest

Path
----
C:\Users\yijian

And then this is exactly where i start to have no clues to continue ... ...

@yijianzeng
Copy link
Contributor Author

@SarahAlidoost Perhaps to be a bit more specific, see below the error message

C:\Users\yijian>docker run -v C:\Users\yijian\STEMMUS_SCOPE\input -v C:\Users\yijian\STEMMUS_SCOPE\output -it ghcr.io/ecoextreml/stemmus_scope:latest

Finished command. Select BMI mode: initialize "C:\Users\yijian\STEMMUS_SCOPE\AR-SLu_2024-01-25-0911_config.txt"
Reading config from C:\Users\yijian\STEMMUS_SCOPE\AR-SLu_2024-01-25-0911_config.txt
Error using textscan
Invalid file identifier. Use fopen to generate a valid file identifier.

Error in io.read_config (line 4)

Error in STEMMUS_SCOPE (line 42)

Error in run (line 91)

Error in STEMMUS_SCOPE_exe (line 54)

MATLAB:FileIO:InvalidFid

Most probably the configuration file in the example run should not be used by Docker version, since the soil property, plumber2 etc. are not uploaded to the zenodo, but simply saved to mat file?

@BSchilperoort
Copy link
Contributor

BSchilperoort commented Oct 21, 2024

Hi Yijian, you're getting an error here because the config file is not in one of the mounted directories. STEMMUS_SCOPE cannot find the file.

Also, you did not use the correct syntax for a bind mount.

This might work:

docker run -v C:\Users\yijian\STEMMUS_SCOPE:C:\Users\yijian\STEMMUS_SCOPE -it ghcr.io/ecoextreml/stemmus_scope:latest

but I am not sure about how the Windows paths work with the mounting syntax (: and \ characters...).

@yijianzeng
Copy link
Contributor Author

Thanks a lot, Bart, we will try under Linux system then.

The main reason for trying it out at Windows is a trial to have a wider user audience, most of the students are still not familier with terminal and the linux system in general. :-)

@BSchilperoort
Copy link
Contributor

Thanks a lot, Bart, we will try under Linux system then.

Windows should work as well, but I am just not sure about the syntax, perhaps ' or " characters are needed.

@yijianzeng
Copy link
Contributor Author

Hi Bart, the Zenodo example dataset does not include the 'Soil Property' folder and 'PLUMBER2' folder, instead, only one site "AR-SLu" data is used here as an example. It is to note that the soil property data is included in the 'soil_parameters.mat', and the meto forcing form 'AR_Slu' are those *.dat files as in the Zenodo example dataset.

I noticed that the Docker image is quite large, I am not sure if that is due to Matlab or if you also put the 'Soil Property' and 'PLUMBER2' data folder into the container?

@BSchilperoort
Copy link
Contributor

the Zenodo example dataset does not include the 'Soil Property' folder and 'PLUMBER2' folder, instead, only one site "AR-SLu" data is used here as an example.

If the config file works with the most recent version of STEMMUS_SCOPE, it should work with the container.

I noticed that the Docker image is quite large, I am not sure if that is due to Matlab or if you also put the 'Soil Property' and 'PLUMBER2' data folder into the container?

The Docker image is large because Matlab Runtime is enormous, ~10 GB on my machine. All of Matlab Runtime has to be included to be able to run the STEMMUS_SCOPE model. With Matlab there is no good way around this.

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

3 participants