RadiaSoft provides Docker containers for our applications and other open source physics codes.
We support automatic installation of our Docker images on Unix-like
systems with curl
installers. You will need to
Install Docker before proceeding with these
instructions.
Most people use Sirepo in the cloud at sirepo.com. However, to run Sirepo locally, you can use this command:
$ curl https://sirepo.run | bash
We run a public JupyterHub at jupyter.radiasoft.org. You can also run our Jupyter Docker image with the same pre-installed of particle accelerator and beam simulation codes on your desktop with:
$ curl https://jupyter.run | bash
To run a different installer, you simply pass it as an argument to bash.
For example, to run the vagrant-sirepo-dev
installer, which installs
a Vagrant/VirtualBox development environment for Sirepo, just type:
$ curl https://radia.run | bash -s vagrant-sirepo-dev
If you use RadiaSoft's home environment (aka. dot files), you get the
radia_run
command, which makes it easier to run an installer, e.g.
$ radia_run vagrant-sirepo-dev
It is more convenient and also allows you to set
an install_server
, which is helpful for developing.
If you already have Docker installed, you can run Sirepo with:
docker run -v $PWD:/sirepo -p 8000:8000 radiasoft/sirepo
If you would like to run our beamsim jupyter notebook server, do:
docker run -v $PWD:/home/vagrant/jupyter -p 8888:8888 radiasoft/beamsim-jupyter
Before installing RadiaSoft containers, you'll need to install Docker:
The output of the curl will also tell you how to connect to the server and/or login to the container. It will create a command in the directory with the same name as the container, which you can use to restart the container. For example, to restart sirepo, just type:
$ ./radia-run
Point your browser to:
http://127.0.0.1:8000
* Running on http://0.0.0.0:8000/ (Press CTRL+C to quit)
* Restarting with stat
To add a downloader, just add to installers
directory. Make
sure the name doesn't conflict with obvious words like verbose
,
debug
, alpha
, beta
, etc. The command line is just a list
of keywords that gets recognized by the installer.
You can also specify a file radiasoft-download.sh
in any repo
directory. The installer will go to that github repo for now.
To test the installer, you can set:
cd ~/src
rm -f index.sh
ln -s -r radiasoft/download/bin/index.sh .
python3 -m http.server 2916
# another window
export install_server=http://$(dig $(hostname -f) +short):2916
# assumes radia_run: curl $install_server/index.sh | bash -s unit-test arg1
radia_run unit-test arg1
This will set the $install_url
to file://$HOME/src
.
You can also pass debug
to get more output.
For each local git repo that is being served, you'll need to:
git update-server-info
Currently, the list is short, e.g. radiasoft/pykern and biviosoftware/home-env:
cd ~/src/radiasoft/pykern
git update-server-info
cd ~/src/biviosoftware/home-env
git update-server-info