Installation¶
There are different ways to install this simulator. Here are the principal ways to do the installation. But first, we encourage to use virtual environments to install and use the simulator. For more informations, look at Virtual environments.
Using pip¶
To install the latest version of the simulator released on Pypi (here) you can use:
pip install spiakid-simulation
If you want to be sure to have the last version, or in order to update the version of the simulator, you can use:
pip install -U spiakid-simulation
From the Source¶
To install the simulator directly from the source, you can go on the gitlab page and clone it through those commands:
git clone https://gitlab.obspm.fr/spiakid/DRS.git
If there is any problem with the dependencies, you can find all the packages in the file requirements.txt
With Docker¶
Another way of using DRS is to use Docker to use the pipeline in a container, but this is only possible for people with access to gitlab (because spiakid-drs is a private project, this will be easier when the project is public). The Docker installation process is as follows here. Then, run the command:
sudo docker login gitlab.obspm.fr:4567/spiakid/drs
This link can be found on gitlab in packages and repositories
and Container registry
, and you can copy the image (here, you need to remove the :latest
ending).
This command will prompt you for your gitlab username and password. After registration, use this command to extract the image:
sudo docker pull gitlab.obspm.fr:4567/spiakid/drs:latest
You can check if your image is correctly created with:
sudo docker images
You can also take the ìmage id
so you can create and run the container with:
sudo docker run -v <Disk path>:<Docker path> -it <image id> bash
The -v
will mount your docker, meaning that all the files that are in your <Disk path>
will be in the Docker path
. If you need diffrent link between your disk and your container, you can add multiple -v
.
Then you will be in the container and you can use DRS. To exit the container, you just have to execute:
exit
If you need some data in docker, first exit the container and use this command:
sudo docker ps -a
This will show you the list of all the container existing on your computer. Find the one you created just before and take the container id
, then:
sudo docker cp <File path> <container id>:<Path in the container>
And you can go back in the container with:
sudo docker start <Container id>
sudo docker exec -it <Container id> bash
And you can check if your file have been correctly copied. At the end, if you want to delete everything (image and container) follow those commands:
sudo docker stop $(sudo docker ps -a -q) # stop the container
sudo docker rm $(sudo docker ps -a -q) # remove all the containers that are not running
sudo docker rmi <image id> # remove the image