Spaces:
Runtime error
Runtime error
File size: 1,337 Bytes
d3ea546 9b8c4e3 e6e8290 c489ae7 d3ea546 6b77eb1 4c4343e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
#!/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"
|