Skip to content

Latest commit

 

History

History
90 lines (66 loc) · 1.72 KB

server_setup.md

File metadata and controls

90 lines (66 loc) · 1.72 KB

How to setup the l2race server

This is a guide how to set up the l2race remote server for the telluride workshop.

Requirements

To install the l2race server, you will need:

  • Ubuntu machine with super user rights
  • Public IP / Internet address
  • Open ports: all UDP ports have to be open and point on the server
  • Conda/Miniconda

Install l2race

Login via SSH to the ubuntu machine and go to your home folder.

First create a conda environment:

conda create --name l2race python=3.8
conda activate l2race

Setup the l2race server like this:

git clone --recursive https://github.com/neuromorphs/l2race.git
cd l2race
pip install -e .

And check if it runs:

python src/server.py

Run l2race as service

Create a start script:

Create the file start.sh in the home folder with the following content:

#!/bin/sh
# - stdout & stderr are stored to a log file
cd l2race
/home/ubuntu/miniconda3/envs/l2race/bin/python3.8 src/server.py

Create a service:

Create a service file called l2race.service in the directory /lib/systemd/system/ with the following content:

[Unit]
Description=L2Race Server for automatically starting after boot

[Service]
Type=simple
WorkingDirectory=/home/ubuntu
ExecStart=/home/ubuntu/start.sh

[Install]
WantedBy=multi-user.target
Alias=l2race.service

and to enable the service run:

sudo systemctl daemon-reload

Start the service at startup:

update-rc.d l2race defaults

Check if the service runs automatically after reboot:

sudo reboot

To start/stop/status the service run:

sudo service l2race start
sudo service l2race stop
sudo service l2race status