Skip to content

edu-ai/aivle-slurm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aiVLE for Slurm

aiVLE Web Backend

Deployment

  1. cd aivle_web
  2. python -m venv aivle_web_venv
  3. source aivle_web_venv/bin/activate
  4. python -m pip install wheel
  5. Follow "Setup" instructions at https://github.com/edu-ai/aivle-web but python manage.py makemigrations app scheduler under Step 4
  6. Follow "Deploying Backend" instructions at https://github.com/edu-ai/aivle-docs/blob/master/docs/dev-guide/deployment-guide.md
  7. Set debug=False and add server URL to ALLOWED_HOSTS in aiVLE/settings.py for safe deployment
  8. Run server with python manage.py runserver

Usage

  1. Create Courses
  2. Set Participations
  3. Add Tasks

aiVLE Worker

Deployment

  1. Download the appropriate grader and gym libraries
  2. cd aivle_worker
  3. python -m venv aivle_worker_venv
  4. source aivle_worker_venv/bin/activate
  5. python -m pip install .
  6. Follow "Getting Started" instructions at https://github.com/edu-ai/aivle-worker
  7. Add TEMP_FOLDER_ROOT to .env file and set it to be the directory to store the job submission files (make sure you have execute permissions in this directory to run bootstrap.sh)
  8. Add MAX_PROCESS_NUM and PROCESS_BUFFER to .env file and set them to be the process limit for your user on the Slurm login node and the buffer between that and the max number of processes you will allow respectively
  9. Get ACCESS_TOKEN using the aivLE Web admin backend under "Tokens" (make sure the user with the token has admin role for "Participations" in intended "Courses")
  10. Run server with python -m aivle_worker

aiVLE Web Frontend

  1. git clone https://github.com/le0tan/aivle-fe
  2. Follow "Deploy Frontend (aiVLE FE)" instructions at https://yuanhong.larksuite.com/docx/doxusHWd5rNVi1qjvgw611wB3de

New Task Setup

  1. Add new task to "Tasks" with task_name in the aiVLE Web Backend
  2. cd TEMP_FOLDER_ROOT/venvs/
  3. python -m venv <task_name>
  4. source <task_name>/bin/activate
  5. Install aiVLE Grader, aiVLE Gym and their required dependencies (locally with --use-pep517 if necessary)
  6. Add task function to aivle_worker/aivle_worker/tasks.py
  7. Add task function to aivle_web/scheduler/celery_app.py

aiVLE Redeployment After NUS Maintenance

  1. Wait for aiVLE Web's server to be up along with the RabbitMQ server.
  2. Restart aiVLE Web.
  3. Get permission for aiVLE Worker to connect to aiVLE Web if necessary.
  4. Get permission for aiVLE Worker to connect to the RabbitMQ server if necessary.

About

Backend for aiVLE, compatible with Slurm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published