0
$\begingroup$

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 to supply the codes?

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

$\endgroup$
5
  • 2
    $\begingroup$ 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). $\endgroup$ Jun 14 at 9:46
  • 1
    $\begingroup$ 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. $\endgroup$
    – ProfRob
    Jun 14 at 12:06
  • 1
    $\begingroup$ @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. $\endgroup$ Jun 14 at 16:50
  • 1
    $\begingroup$ @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. $\endgroup$ Jun 14 at 17:01
  • 2
    $\begingroup$ 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. $\endgroup$
    – James K
    Jun 14 at 20:46
4
$\begingroup$

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.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.