atrawog / micromamba-devcontainer-example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

micromamba-devcontainer-example

This is an example project which uses micromamba-devcontainer. The .devcontainer folder was created using Cruft with cookiecutter-micromamba-devcontainer.

Links

Deploying with an existing project

  • Install Cruft (also manages updates) or Cookiecutter.

  • Create .devcontainer by running the command

    cruft create https://github.com/maresb/cookiecutter-micromamba-devcontainer

    or

    cookiecutter https://github.com/maresb/cookiecutter-micromamba-devcontainer

    You will be asked values for the following variables, which are stored in .devcontainer/.cruft.json:

    • package_name: The name of the main package of your project, as you would import it from Python.
    • timezone: The timezone to configure in the devcontainer.
    • packages_dir: The directory where package_name is located (often src), or . for the project root.
  • If your project uses Docker, ensure that your .dockerignore contains .devcontainer/cache.

  • Customize .devcontainer/dev-conda-environment.yaml with your desired Conda development packages.

  • Customize .devcontainer/dev.Dockerfile to install (a skeleton of) your project, preferrably in editable mode (e.g. pip install -e .). This way the project dependencies will be installed in the devcontainer.

  • Customize the extensions and settings in .devcontainer/devcontainer.json.

  • Press Ctrl+Shift+P and select "Remote-Containers: Rebuild and Reopen in Container", and if all goes well, this will load successfully.

Troubleshooting

For more information, see micromamba-devcontainer.

About

License:MIT License


Languages

Language:Dockerfile 74.9%Language:Python 25.1%