-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #81 from diegoferigo/devcontainer
Add GitHub Codespaces support
- Loading branch information
Showing
5 changed files
with
103 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
FROM mcr.microsoft.com/devcontainers/base:ubuntu | ||
COPY environment.yml /opt/environment.yml | ||
|
||
# Enable by default the conda environment for all users. | ||
# The prefix is the one used by the micromamba feature. | ||
ENV CONDA_PREFIX_JAXSIM=/opt/conda/envs/jaxsim | ||
RUN echo 'function activate_conda() {' >> /etc/bash.bashrc &&\ | ||
echo ' eval "$(micromamba shell hook -s bash)"' >> /etc/bash.bashrc &&\ | ||
echo ' micromamba activate ${CONDA_PREFIX_JAXSIM-$CONDA_PREFIX}' >> /etc/bash.bashrc &&\ | ||
echo '}' >> /etc/bash.bashrc &&\ | ||
echo '[[ -x $(which micromamba) && -d ${CONDA_PREFIX_JAXSIM-$CONDA_PREFIX} ]] && activate_conda' >> /etc/bash.bashrc &&\ | ||
echo '[[ -x $(which micromamba) && ! -x $(which mamba) ]] && alias mamba="$(which micromamba)"' >> /etc/bash.bashrc &&\ | ||
echo '[[ -x $(which micromamba) && ! -x $(which conda) ]] && alias conda="$(which micromamba)"' >> /etc/bash.bashrc | ||
|
||
# Provide libGL.so.1 from the host OS | ||
RUN sudo apt-get update &&\ | ||
sudo apt-get install -y --no-install-recommends libgl1 &&\ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# The Python extension in VSCode is not able to detect the interpreter installed with micromamba. | ||
# As documented as follows, we provide a suggestion through an environment variable. | ||
# https://code.visualstudio.com/docs/python/environments#_where-the-extension-looks-for-environments | ||
ENV WORKON_HOME=$CONDA_PREFIX_JAXSIM | ||
|
||
# Specify the workdir of the container | ||
WORKDIR /workspace/jaxsim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu | ||
{ | ||
"name": "Ubuntu", | ||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile | ||
"build": { | ||
"context": "..", | ||
"dockerfile": "Dockerfile", | ||
}, | ||
|
||
// Features to add to the dev container. More info: https://containers.dev/features. | ||
"features": { | ||
"ghcr.io/mamba-org/devcontainer-features/micromamba:1": { | ||
"envFile": "/opt/environment.yml", | ||
}, | ||
}, | ||
|
||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [], | ||
|
||
// Use 'postCreateCommand' to run commands after the container is created. | ||
// "postCreateCommand": "uname -a", | ||
|
||
// Configure tool-specific properties. | ||
// "customizations": {}, | ||
|
||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. | ||
// "remoteUser": "root" | ||
|
||
// VSCode extensions | ||
"extensions": [ | ||
"ms-python.python", | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: jaxsim | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
# Dependencies from setup.cfg | ||
- python=3.11 | ||
- coloredlogs | ||
- jax >= 0.4.13 | ||
- jaxlib | ||
- jaxlie >= 1.3.0 | ||
- jax-dataclasses >= 1.4.0 | ||
- pptree | ||
- rod | ||
# Optional dependencies from setup.cfg | ||
- black | ||
- isort | ||
- idyntree | ||
- pytest | ||
- pytest-forked | ||
- pytest-icdiff | ||
- robot_descriptions | ||
# System dependencies to run the tests | ||
- gz-sim7 | ||
# Other packages | ||
- ipython | ||
# Documentation dependencies | ||
- cachecontrol | ||
- enum_tools | ||
- filecache | ||
- filelock | ||
- jinja2 | ||
- sphinx | ||
- sphinx-autodoc-typehints | ||
- sphinx-copybutton | ||
- sphinx_fontawesome | ||
- sphinx-jinja2-compat | ||
- sphinx-multiversion | ||
- sphinx_rtd_theme | ||
- sphinx-toolbox |