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 | bashWe 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 | bashTo 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-devIf 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-devIt 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/sirepoIf you would like to run our beamsim jupyter notebook server, do:
docker run -v $PWD:/home/vagrant/jupyter -p 8888:8888 radiasoft/beamsim-jupyterBefore 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 statTo 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 run installers, the root of the tree is ~/src so this file would
be ~/src/radiasoft/download/README.md. If your home directory is not
set up this way, the following will not work.
Installers can be run with a Python's http.server as follows:
bash etc/dev-server.shThis command starts the http.server and outputs instructions on how to run installers in the local dev environment.
Many of the installers can be tested with:
export install_server=file://$HOME/src
curl $install_server/radiasoft/download/bin/install.sh | install_debug=1 bash -s python-ciAssumes a directory structure where src/radiasoft/download is this repo.
To test with a github install_server, that is, to test install.sh itself, you an run it this way:
bash -s debug some/repo < download/bin/install.sh