# Help in running OpenMC on Docker for Windows 11

**URL:** https://openmc.discourse.group/t/help-in-running-openmc-on-docker-for-windows-11/2282
**Category:** User Support
**Created:** [September 11, 2022, 1:02pm UTC](https://openmc.discourse.group/t/help-in-running-openmc-on-docker-for-windows-11/2282 "2022-09-11T13:02:08Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![IIP](https://avatars.discourse-cdn.com/v4/letter/i/e5b9ba/32.png) [@IIP](https://openmc.discourse.group/u/IIP)
#### Post date: [September 11, 2022, 1:02pm UTC](https://openmc.discourse.group/t/help-in-running-openmc-on-docker-for-windows-11/2282/1 "2022-09-11T13:02:08Z")

</div>

Greetings!

I followed the instructions for Windows installation using Docker.

However this is unable to get called: [openmc.examples](https://docs.openmc.org/en/stable/pythonapi/examples.html) nor am I able to run the code given in the [documentation for Python API](https://docs.openmc.org/en/stable/_modules/openmc/examples.html#pwr_core).

I am new to this type of coding (in Docker/Linux environment), please guide me.

Thanks!

---

<div class="post-metadata">

### Author: ![Shimwell](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/shimwell/32/3876_2.png) [@Shimwell](https://openmc.discourse.group/u/Shimwell)
#### Post date: [September 14, 2022, 3:06pm UTC](https://openmc.discourse.group/t/help-in-running-openmc-on-docker-for-windows-11/2282/2 "2022-09-14T15:06:52Z")

</div>

Sorry I’ve not tried the Docker in windows 11. I’ve got a tutorial for Windows 10 with a slightly different docker image if that helps.

[![](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/e/e5903c48c5c85ff2660c56dccc5c01766dea6aa7.jpeg "OpenMC workshop install on Windows 10") ](https://www.youtube.com/watch?v=1MUYgjEQeIA)

You would just have to change the name of the docker imaged used to one of these tags [Docker](https://hub.docker.com/r/openmc/openmc/tags)

---

<div class="post-metadata">

### Author: ![IIP](https://avatars.discourse-cdn.com/v4/letter/i/e5b9ba/32.png) [@IIP](https://openmc.discourse.group/u/IIP)
#### Post date: [September 15, 2022, 10:17am UTC](https://openmc.discourse.group/t/help-in-running-openmc-on-docker-for-windows-11/2282/3 "2022-09-15T10:17:52Z")

</div>

Thanks @Shimwell

So, I originally used `docker run openmc/openmc:latest` and could not run any example, so if I use `docker pull openmc/openmc:develop-dagmc` instead, will I be able to execute the example [here](https://nbviewer.org/github/openmc-dev/openmc-notebooks/blob/main/pincell.ipynb) or [here](https://docs.openmc.org/en/stable/pythonapi/examples.html) ?

Thanks!

---

<div class="post-metadata">

### Author: ![Pranto](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/pranto/32/489_2.png) [@Pranto](https://openmc.discourse.group/u/Pranto)
#### Post date: [September 15, 2022, 1:04pm UTC](https://openmc.discourse.group/t/help-in-running-openmc-on-docker-for-windows-11/2282/4 "2022-09-15T13:04:03Z")

</div>

@IIP If you want to run notebook file from the terminal, you have to convert it to python script first. Then rename the generated script to be an `IPython` script by changing the extension to `.ipy` and run it with `ipython`

So the steps on the command line all together would be:

```bash
jupyter nbconvert pincell.ipynb --to python
mv pincell.py pincell.ipy
ipython pincell.ipy

```

---

<div class="post-metadata">

### Author: ![IIP](https://avatars.discourse-cdn.com/v4/letter/i/e5b9ba/32.png) [@IIP](https://openmc.discourse.group/u/IIP)
#### Post date: [September 16, 2022, 5:06am UTC](https://openmc.discourse.group/t/help-in-running-openmc-on-docker-for-windows-11/2282/5 "2022-09-16T05:06:08Z")

</div>

Thanks @Pranto . I have a few more queries:

1. If I want to write and run code in a Jupyter Notebook (instead of code conversion) or Lab environment, how can I do that ?

2. For geometry, is there a direct way to import CAD from mainstream software like SolidWorks and Creo, instead of DAGMC ?

Thanks!

---

<div class="post-metadata">

### Author: ![Pranto](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/pranto/32/489_2.png) [@Pranto](https://openmc.discourse.group/u/Pranto)
#### Post date: [September 16, 2022, 2:07pm UTC](https://openmc.discourse.group/t/help-in-running-openmc-on-docker-for-windows-11/2282/6 "2022-09-16T14:07:05Z")

</div>

1. First, You have to install `jupyter lab` inside the container with the command as follows:

```bash
docker run -it --name=jupyter_lab openmc/openmc:latest
pip install jupyterlab
git clone https://github.com/openmc-dev/openmc-notebooks.git && exit
docker commit jupyter_lab openmc_notebook
docker run -it --rm -p 8888:8888 openmc_notebook jupyter lab --ip=0.0.0.0 --port=8888 --no-browser --allow-root --notebook-dir=/openmc-notebooks

```

At this point, an HTTP address will appear in your terminal output, copy this address into your browser, and you’re ready to code!

1. Nope! But If you’re looking for the alternative of `coreform-cubit` for import and imprint/merging algorithm, you can try [CAD\_to\_OpenMC](https://github.com/openmsr/CAD_to_openMC) python package.

---

<div class="post-metadata">

### Author: ![IIP](https://avatars.discourse-cdn.com/v4/letter/i/e5b9ba/32.png) [@IIP](https://openmc.discourse.group/u/IIP)
#### Post date: [September 17, 2022, 3:15am UTC](https://openmc.discourse.group/t/help-in-running-openmc-on-docker-for-windows-11/2282/7 "2022-09-17T03:15:31Z")

</div>

Sorry for so many questions (I’m new to this) but what difference is in pulling OpenMC using  
`docker pull openmc/openmc:latest` from any other, such as `docker pull openmc/openmc:develop-dagmc-libmesh`.

I noticed the ‘develop’ one’s are larger in size and have been pushed recently…

Thanks again.

---

<div class="post-metadata">

### Author: ![IIP](https://avatars.discourse-cdn.com/v4/letter/i/e5b9ba/32.png) [@IIP](https://openmc.discourse.group/u/IIP)
#### Post date: [September 18, 2022, 9:43am UTC](https://openmc.discourse.group/t/help-in-running-openmc-on-docker-for-windows-11/2282/10 "2022-09-18T09:43:13Z")

</div>

@Pranto, PowerShell couldn’t run the commands. However, it worked on Command Prompt, but no link was generated…

Please advise.

Thanks.

---

<div class="post-metadata">

### Author: ![Shimwell](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/shimwell/32/3876_2.png) [@Shimwell](https://openmc.discourse.group/u/Shimwell)
#### Post date: [September 20, 2022, 2:44pm UTC](https://openmc.discourse.group/t/help-in-running-openmc-on-docker-for-windows-11/2282/11 "2022-09-20T14:44:18Z")

</div>

The different docker images contain OpenMC compiled in different ways. Some include extra programs like Libmesh or DAGMC while the `openmc/openmc:latest` is a minimal version. If the minimal version has everything you need then I would stick with that.

---

<div class="post-metadata">

### Author: ![IIP](https://avatars.discourse-cdn.com/v4/letter/i/e5b9ba/32.png) [@IIP](https://openmc.discourse.group/u/IIP)
#### Post date: [September 23, 2022, 1:51am UTC](https://openmc.discourse.group/t/help-in-running-openmc-on-docker-for-windows-11/2282/12 "2022-09-23T01:51:19Z")

</div>

@Shimwell could you advise on this please.

---

<div class="post-metadata">

### Author: ![Shimwell](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/shimwell/32/3876_2.png) [@Shimwell](https://openmc.discourse.group/u/Shimwell)
#### Post date: [September 23, 2022, 4:25pm UTC](https://openmc.discourse.group/t/help-in-running-openmc-on-docker-for-windows-11/2282/13 "2022-09-23T16:25:43Z")

</div>

Unfortunately I don’t have Windows but Prantos instructions look good to me.

Here is a quick demonstration of how to build on top of the openmc dockerfile to add jupyter lab, build and run the dockerfile in Linux

[![](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/1/1ee177679dd5983a75ef1a00973bbe96ae2caef1.jpeg "Adding Jupyter Lab to the OpenMC Docker image.") ](https://www.youtube.com/watch?v=0rHxAct8tjM)

---

<div class="post-metadata">

### Author: ![Shimwell](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/shimwell/32/3876_2.png) [@Shimwell](https://openmc.discourse.group/u/Shimwell)
#### Post date: [September 23, 2022, 4:37pm UTC](https://openmc.discourse.group/t/help-in-running-openmc-on-docker-for-windows-11/2282/14 "2022-09-23T16:37:22Z")

</div>

_Re: For geometry, is there a direct way to import CAD from mainstream software like SolidWorks and Creo, instead of DAGMC ?_

Provided that your CAD software can output Brep, STP or STL files then there are a few tools out there for conversion to DAGMC h5m files which can then be run in OpenMC.

We maintain a list of such software here

> **[List of DAGMC tools · Discussion #812 · svalinn/DAGMC](https://github.com/svalinn/DAGMC/discussions/812)**
>
> We have a growing number of software tools and I thought it might be worth making a list of everything with a brief description. Name Link Description DAGMC-stats https://github.com/svalinn/dagmc\_s...

I’m working on yet another addition to this list and can post here once it is more ready

---

<div class="post-metadata">

### Author: ![Shimwell](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/shimwell/32/3876_2.png) [@Shimwell](https://openmc.discourse.group/u/Shimwell)
#### Post date: [September 26, 2022, 11:39am UTC](https://openmc.discourse.group/t/help-in-running-openmc-on-docker-for-windows-11/2282/15 "2022-09-26T11:39:44Z")

</div>

I just released the version 0.1.1 of [cad\_to\_dagmc](https://github.com/fusion-energy/cad_to_dagmc) which can convert CAD files in STP format or CadQuery objects into DAGMC h5m files. It might help convert your CAD geometry @IIP

---

<div class="post-metadata">

### Author: ![lorenzoloi](https://avatars.discourse-cdn.com/v4/letter/l/43a26b/32.png) [@lorenzoloi](https://openmc.discourse.group/u/lorenzoloi)
#### Post date: [November 14, 2022, 5:09pm UTC](https://openmc.discourse.group/t/help-in-running-openmc-on-docker-for-windows-11/2282/16 "2022-11-14T17:09:34Z")

</div>

Hello @Shimwell,  
There exist some tutorial on the usage of the `cad_to_openmc` package?

Thanks,  
Lorenzo

---

<div class="post-metadata">

### Author: ![Shimwell](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/shimwell/32/3876_2.png) [@Shimwell](https://openmc.discourse.group/u/Shimwell)
#### Post date: [November 15, 2022, 11:18am UTC](https://openmc.discourse.group/t/help-in-running-openmc-on-docker-for-windows-11/2282/17 "2022-11-15T11:18:05Z")

</div>

I’ve not seen a tutorial for the cad\_to\_openmc package which was created by Erik. Perhaps you can request a tutorial on the github page as I’m not sure if Erik visits the discourse channel

> **[GitHub - openmsr/CAD\_to\_OpenMC: code to target the conversion from a...](https://github.com/openmsr/CAD_to_OpenMC)**
>
> code to target the conversion from a step-file to a h5m-geometry for neutronics - GitHub - openmsr/CAD\_to\_OpenMC: code to target the conversion from a step-file to a h5m-geometry for neutronics

---

<div class="post-metadata">

### Author: ![Nilormi](https://avatars.discourse-cdn.com/v4/letter/n/bc8723/32.png) [@Nilormi](https://openmc.discourse.group/u/Nilormi)
#### Post date: [March 22, 2023, 1:28pm UTC](https://openmc.discourse.group/t/help-in-running-openmc-on-docker-for-windows-11/2282/18 "2023-03-22T13:28:29Z")

</div>

![image](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/c/c37225071f286c2fa4c8debb8dd48172be2104a3.png)  
How do I proceed from here?
