I am starting an internship soon where I will need to become familiar with OpenMC, and I have been reviewing the documentation and would like to try some examples on my system. I am using a Windows system, so I am trying to use OpenMC with docker. I was able to follow the steps in the Devloper’s Guide (7. Deployment with Docker — OpenMC Documentation), and I am now here: “This command will open an interactive shell running from within the Docker container where you have access to use OpenMC.”. – I have this shell running, but I don’t understand how to proceed from here to run my own Python script. An ls command shows me this:
root@86c2a48d914b:/# ls bin dev home lib32 libx32 mnt proc run srv tmp var boot etc lib lib64 media opt root sbin sys usr
How do I run some python code that I’ve written using OpenMC now?
When I run that command, instead of seeing “C:\Users\Luke>”, it changes to “root@0e5215463fdf:/#”, which I assume means that the image is running. But now the python file_name.py command does not work. It seems like the image doesn’t have access to these files. Am I missing something?
Ok, do you mind explaining what that first command is doing? I looked up the cp command on Docker and it says you need to specify a source and destination. The source I imagine would be my local pin_cell.py file, but how do I specify a destination on the image that I’m going to run in docker?
&& is used for chain commands such that the next command is run if and only if the preceding command exits without error. You can run each command separately
$ cd /opt/
$ mkdir test_run
$ cd /opt/test_run
To refer the destination you can use a dot (.) means copy the file in my current working directory.
Another option for running files within the Docker container is to install VScode on windows along with the Remote Contain addition. This provides a terminal and a IDE that inherits from the container.
Could you please kindly elaborate the steps? I am using OpenMC for my project. I have no one to guide except this forum.
I have installed Docker container, Visual Studio, Git, Dev Container extension, and Python. How do I execute? Is it possible for you to have a meeting with you so that I can share my screen and you can kindly guide me?