Installation problems

After following the instructions, I have been struggling for days to access OpenMC from Jupyter Notebook or Jupyter Lab, or to obtain a working link. What is the next command to run the Docker container with the name “my_openmc” using the image “debian/openmc:latest”, and what is the difference if I choose a different folder?

Additionally, I attempted to use the command “docker run -it --name=my_openmc debian/openmc” which logged me into the root shell. I tried using the “help” command to navigate, but could not find a suitable command to launch OpenMC in Jupyter Lab or Notebook.

run docker -it --name=my_openmc debian/openmc:latest

what should be next

and if I am in
root@8d36f669fd0c:/#
how to use it to prepare openmc file

Thank you

1 Like

Apologies,
I have navigated through the posts that come close to what I am looking for. I cannot call OpenMC as an import from a Python notebook. I have used Docker and am able to log in as root. From my reading in the posted manual, I have to create a .xml file to be able to import OpenMC. In the posted example notebook, it is already using imported openmc. What is the plain format of a .xml file and how is it saved and executed

The openmc docker files from different options Docker but they do not contain jupyter notebooks or jupyter lab.

You can install extra packages into a docker container and build upon it so that it contains jupyter, is that what you want to do?

The xml files are executed by runing openmc in the same directory. However you can also run openmc directly from within python.

Thank you for your prompt reply. I am having difficulty creating the links as they are not working or unable to connect.

As I am running already jupyter on windows , It may be best to install via conda commands, however, I am encountering many problems. For example, when I tried running the command “mamba search openmc” in the openmc-env folder, it did not return any matches.

We don’t currently have a conda/mamba build of openmc for windows.

The options for windows are either WSL or Docker.

The jupyter you are running on windows is not quite the same as running jupyter inside the docker inside windows.

Which route would you ideally like to get working?

Ideally, I would like to have OpenMC available on both Linux and Windows, and getting started is fine in either operating system. In the future, it may be advantageous to have different methods of installation for potential students

Currently, I have tried to install OpenMC on Linux using Conda, but encountered error code 404. It appears that I need to update Anaconda. Therefore, I installed the code in my Anaconda web free jupyter lab cloud account. I used conda commands to continue the installation. When using the shell terminal in Jupyter Lab on the cloud, I was able to execute the openmc command under the ‘openmc-env’ and it prompted asking for XML file. Additionally, running the Jupyter Lab command provided a page link at the end of the ex that directed and prompted to executable shell with commands and options. However, when I clicked on the link, I received an error message stating “Unable to connect to the server at localhost:8888”.

I was able to log into the root shell using Docker, and Jupyter was installed using Docker. However, I am still unsure about how to prepare the XML file. Is there an example available in plain format? Also, what extension should I save the file as (e.g. txt.xml)?
The example in the installation instructions for a pencil beam is written after importing openmc.

Thank you for your help

The xml files are normally produced by using the python api.

You would make an openmc.Model object in the python api and then export it to xml.

Perhaps give these getting start docs a read User’s Guide — OpenMC Documentation

Thank you , I was able finally to lunch jupyter lab and able to import openmc

Regards