How to use ddpg on the TU-Darmstadt Lichtenberg cluster
For general information about the cluster usage see hhlr.
After you have set up password-free login you can access your cluster files via
nautilus sftp://<username>@lcluster2.hrz.tu-darmstadt.de/home/<username> & exit
It might be convenient to create a bash function for this in the `~\.bashrc` on your machine.
```bash function clfiles { nautilus sftp://@lcluster2.hrz.tu-darmstadt.de/home/ & exit } ```To use python on the cluster we need to load some modules first. Add the following to your ~\.bashrc
on the cluster.
module load git gcc intel python/2
export PATH=$PATH:$HOME/.local/bin:$HOME/bin
Use pip to install the CPU version of TensorFlow. Follow the instructions. Notice that we have to install python packages via pip install --user <package-name>
because we do not have root access.
TODO: Installing the GPU version of TensorFlow
Install gym via pip install gym --user
.
To record video we need ffmpeg. Download the static build from http://johnvansickle.com/ffmpeg/ and unpack to an arbitrary location on the cluster. Lastly, put a symlink to the ffmpeg
binary in ~/.local/bin/
.
We also need a virtual frame buffer to render the environments on the cluster. You can add the following to the ~\.bashrc
.
killall Xvfb
Xvfb :1 -screen 0 1400x900x24 &
trap 'kill $(jobs -p)' EXIT
export DISPLAY=:1
To use the gym mujoco bindings, follow the instructions at https://github.com/openai/mujoco-py.
Example:
python run.py --outdir ../ddpg-results/experiment1 --env Reacher-v1
Enter python run.py -h
to get a complete overview.
Submit a SLURM job via:
python run.py --outdir ../ddpg-results/experiment1 --env Reacher-v1 --job
Example:
python dashboard.py --exdir ../ddpg-results
Enter python dashboard.py -h
to get a complete overview.