train-robots-with-mujoco / start_server.sh
jbilcke-hf's picture
jbilcke-hf HF Staff
testing something
4c4343e
raw
history blame
1.34 kB
#!/bin/bash
JUPYTER_TOKEN="${JUPYTER_TOKEN:=huggingface}"
NOTEBOOK_DIR="/data"
# Set up NVIDIA EGL library links at runtime (in case they're mounted differently)
echo "🔗 Setting up NVIDIA EGL library links..."
for nvidia_lib_dir in /usr/local/nvidia/lib64 /usr/local/cuda/lib64 /usr/lib/nvidia; do
if [ -f "$nvidia_lib_dir/libEGL_nvidia.so.0" ]; then
echo "Found NVIDIA EGL library at $nvidia_lib_dir/libEGL_nvidia.so.0"
ln -sf "$nvidia_lib_dir/libEGL_nvidia.so.0" /usr/lib/x86_64-linux-gnu/libEGL_nvidia.so.0
break
fi
done
# perform checks on the GPU configuration
python init_gpu.py
# this will download stuff used by Mujoco (the collection of models)
python init_mujoco.py
jupyter labextension disable "@jupyterlab/apputils-extension:announcements"
jupyter-lab \
--ip 0.0.0.0 \
--port 7860 \
--no-browser \
--allow-root \
--ServerApp.token="$JUPYTER_TOKEN" \
--ServerApp.tornado_settings="{'headers': {'Content-Security-Policy': 'frame-ancestors *'}}" \
--ServerApp.cookie_options="{'SameSite': 'None', 'Secure': True}" \
--ServerApp.disable_check_xsrf=True \
--LabApp.news_url=None \
--LabApp.check_for_updates_class="jupyterlab.NeverCheckForUpdate" \
--notebook-dir=$NOTEBOOK_DIR \
--ServerApp.default_url="/lab/tree/samples/locomotion.ipynb"