<p>As someone who has done this with other astronomy research grade software, I can say that using Docker fixes some problems but also creates new problems as well. I'll assume for this that your software is designed for linux but you want to support students who'll mostly be using Windows/Macs.</p>
<p><strong>Pros:</strong></p>
<ul>
<li>You can ship your application pre-compiled so users don't need to worry about dependenices or working out how to compile your software.</li>
</ul>
<p><strong>Cons:</strong></p>
<ul>
<li>You still need to get the students to get docker installed and working. I found using Docker that we traded dependency/compiling errors (which I can debug) with Docker errors that I have no idea how to fix.</li>
<li>Analysis of the data is more difficult inside a Docker container. You either need to get the out out of the container or ship it with all the tools anyone might need to explore the data inside the container.</li>
</ul>
<p><strong>Other considerations:</strong></p>
<ul>
<li>You still need to use the students laptops to run the code. Never underestimate how old these will be or little CPU/RAM/Hard disk space they will have (though this also applies to them running it natively)</li>
<li>Even using Docker you'll still be dumping the students into a Linux command line, which you'll still need to teach how to use.</li>
<li>I have found using WSL2 easier than Docker as its easier for the students to find the files on their hard drive to view/edit outside of WSL2 (but see above considerations about their laptops).</li>
</ul>
<p>I would second @planetmaker's comment on using jupyter notebooks, if possible, but suggest going one step further and running the notebooks on your machine(s)/servers. Then the users just need a web browser to run the code.</p>
<p>Whether you run the problem natively (i.e ./reionization) or wrapped behind a python wrapper depends on what your teaching. Are you teaching this particular software?, in which case tell them to put linux on their machines or give them ssh access to a linux server. If your teaching reionization in general, then i'd wrap the interesting bits of the code behind a python wrapper and run a jupyter notebook.</p>

CC BY-SA 4.0
2021-06-14T11:26:35.297Z
2021-06-14T17:31:42.057Z
2021-06-14T17:31:42.057Z
Rob
<p>I am going to organize a tutorial in which I intend to train students on semi numerical simulations for reionization. Is it a good idea to supply <a href="https://en.wikipedia.org/wiki/Docker_(software)" rel="nofollow noreferrer">use Docker</a> to supply the codes?</p>
<p>What do you think about it? Any suggestions are welcome.</p>

CC BY-SA 4.0
2021-06-14T09:46:48.283Z
I'm doubtful that the average astronomy student knows how to handle docker containers. You'd have to give a detailed setup guide. Using like python notepads (jupyter) is much more common and IMHO also more usable for students (more ressources, more chance to use the same technique for other endevours in these areas etc).
planetmaker
CC BY-SA 4.0
2021-06-14T12:06:31.873Z
I have no idea what this question is about and I'm sire I won't be alone. Can we have some links/explanation? Also can you clarify that this isn't just a question about distributing software - which would be off-topic.
ProfRob
CC BY-SA 4.0
2021-06-14T16:50:52.983Z
@ProfRob planetmaker and Rob both knew what this question is about. Moreover, the OP wouldn't have received either planetmaker's  comment or Rob's answer had this had been asked on StackOverflow.
David Hammen
CC BY-SA 4.0
2021-06-14T17:01:47.023Z
@ProfRob The OP wants to create Docker containers on his Linux machine so his students so can run the software on their Windows or Mac laptops. To the software running in the container, the laptop acts like a Linux box -- with exactly the right dependencies.
David Hammen
CC BY-SA 4.0
2021-06-14T20:46:52.333Z
I’m voting to close this question because it is a question about distributing software. Neither the question nor the given answer make it clear what this significance of "semi numerical simulation of reionisation" has to the question.  As far as I can see, it could be the same question and answer if you were doing "semi numerical simulations of elephant population" or "... London bonds" or any other topic.
James K
<cosmology><software><n-body-simulations>
Would it be a good idea to dockerize softwares in order to conduct hands-on tutorial sessions?
Yami
# Would it be a good idea to dockerize softwares in order to conduct hands-on tutorial sessions?

(Asked by: username_0 on 2021-06-14)

I am going to organize a tutorial in which I intend to train students on semi numerical simulations for reionization. Is it a good idea to supply [use Docker](https://en.wikipedia.org/wiki/Docker_(software)) to supply the codes?

What do you think about it? Any suggestions are welcome.

**Tags:** cosmology, software, n-body-simulations
> **Comments:**
> **username_1**: I'm doubtful that the average astronomy student knows how to handle docker containers. You'd have to give a detailed setup guide. Using like python notepads (jupyter) is much more common and IMHO also more usable for students (more ressources, more chance to use the same technique for other endevours in these areas etc).  
> **username_2**: I have no idea what this question is about and I'm sire I won't be alone. Can we have some links/explanation? Also can you clarify that this isn't just a question about distributing software - which would be off-topic.  
> **username_3**: @ProfRob planetmaker and Rob both knew what this question is about. Moreover, the OP wouldn't have received either planetmaker's  comment or Rob's answer had this had been asked on StackOverflow.  
> **username_3**: @ProfRob The OP wants to create Docker containers on his Linux machine so his students so can run the software on their Windows or Mac laptops. To the software running in the container, the laptop acts like a Linux box -- with exactly the right dependencies.  
> **username_4**: I’m voting to close this question because it is a question about distributing software. Neither the question nor the given answer make it clear what this significance of "semi numerical simulation of reionisation" has to the question.  As far as I can see, it could be the same question and answer if you were doing "semi numerical simulations of elephant population" or "... London bonds" or any other topic.  

---

## 1 answers

### Answer by username_5 on 2021-06-14. Score: 4

As someone who has done this with other astronomy research grade software, I can say that using Docker fixes some problems but also creates new problems as well. I'll assume for this that your software is designed for linux but you want to support students who'll mostly be using Windows/Macs.

**Pros:**

* You can ship your application pre-compiled so users don't need to worry about dependenices or working out how to compile your software.

**Cons:**

* You still need to get the students to get docker installed and working. I found using Docker that we traded dependency/compiling errors (which I can debug) with Docker errors that I have no idea how to fix.
* Analysis of the data is more difficult inside a Docker container. You either need to get the out out of the container or ship it with all the tools anyone might need to explore the data inside the container.

**Other considerations:**

* You still need to use the students laptops to run the code. Never underestimate how old these will be or little CPU/RAM/Hard disk space they will have (though this also applies to them running it natively)
* Even using Docker you'll still be dumping the students into a Linux command line, which you'll still need to teach how to use.
* I have found using WSL2 easier than Docker as its easier for the students to find the files on their hard drive to view/edit outside of WSL2 (but see above considerations about their laptops).

I would second @planetmaker's comment on using jupyter notebooks, if possible, but suggest going one step further and running the notebooks on your machine(s)/servers. Then the users just need a web browser to run the code.

Whether you run the problem natively (i.e ./reionization) or wrapped behind a python wrapper depends on what your teaching. Are you teaching this particular software?, in which case tell them to put linux on their machines or give them ssh access to a linux server. If your teaching reionization in general, then i'd wrap the interesting bits of the code behind a python wrapper and run a jupyter notebook.


---

