This is the automated Scheduler for Gemini Observatory, part of the GPP project.
For the list of dependencies check: requirements.txt
.
Note: These instructions assume you are using Mac OS X or Linux.
Fork the project and then clone into your desired directory.
You may wish to also fork and clone the lucupy repository, which is the package that contains the model for this project.
Using virtualenv:
Make sure you have an active Python 3.10 or 3.11 distribution installed on your machine.
virtualenv can be installed using pip:
$ pip install virtualenv
Then in the project directory, execute:
$ virtualenv --python=/path/to/python_executable venv
$ source venv/bin/activate
$ pip install -r requirements.txt
In the project directory, execute:
$ conda env create -f environment.yml
$ conda activate scheduler
To run the scheduler as a standalone script, execute:
$ python scheduler/scripts/run_greedymax.py
If you have performed the installation correctly, you should see logging messages, and an output of a plan, followed
by the message DONE
.
To run the scheduler as a service, execute:
$ python scheduler/main.py
We offer Jupyter notebooks using a Mercury user interface to test the scheduler.
This can be launched on localhost:8000
as follows:
$ cd demo
$ mercury run
This should open a tab in your active browser and show the notebooks.
If the startup complains about a missing allauth
package, install this with:
$ pip install django-allauth
- Run Docker-compose. If is the first time running the script, it will take some time to build the images.
$ docker build -t scheduler .
$ docker run -dp 8000:8000 scheduler
- You can access
http://localhost:8000/graphql
to interact with the GraphQL console.
The most likely cause of issues during execution is that changes have been made to the lucupy project and an update of the package is necessary. This can be done with:
$ pip install -U lucupy