2025-03-25 12:24:12 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Creates and sets up your Python 3.10 venv
|
|
|
|
python3.10 -m venv venv310
|
|
|
|
source venv310/bin/activate
|
|
|
|
|
2025-03-29 13:07:15 +01:00
|
|
|
# Make sure colcon doesn't try to index the venv310 directory
|
|
|
|
touch venv310/COLCON_IGNORE
|
|
|
|
|
2025-03-25 12:24:12 +01:00
|
|
|
# Install Python packages
|
|
|
|
pip install --upgrade pip
|
|
|
|
pip install \
|
2025-03-29 13:07:15 +01:00
|
|
|
cython \
|
|
|
|
pathlib2 \
|
2025-03-25 12:24:12 +01:00
|
|
|
numpy \
|
|
|
|
matplotlib \
|
|
|
|
ipympl \
|
|
|
|
jupyterlab \
|
|
|
|
jupyterlab-widgets \
|
|
|
|
ipykernel
|
|
|
|
|
2025-03-29 13:07:15 +01:00
|
|
|
pip3 install --upgrade pytest colcon-common-extensions setuptools
|
|
|
|
|
2025-03-25 12:24:12 +01:00
|
|
|
# Register venv310 as Jupyter kernel
|
|
|
|
python -m ipykernel install --user --name=venv310 --display-name="Python 3.10 (venv310)"
|
|
|
|
|
2025-03-29 13:07:15 +01:00
|
|
|
# Make sure the venv310 is activated when starting a new shell
|
|
|
|
echo "source /workspaces/ROS-Dynamic-Executor-Experiments/venv310/bin/activate" >> /root/.bashrc
|
|
|
|
|
2025-03-25 12:24:12 +01:00
|
|
|
echo "Setup complete! Activate with: source venv310/bin/activate"
|
|
|
|
echo "Then start JupyterLab with: jupyter lab --ip=0.0.0.0 --port=8888 --allow-root"
|