Our great sponsors
-
templates
Repository for Dev Container Templates that are managed by Dev Container spec maintainers. See https://github.com/devcontainers/template-starter to create your own! (by devcontainers)
-
spec
Development Containers: Use a container as a full-featured development environment. (by devcontainers)
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
conda-devcontainer-demo
Mini Conda + Mamba dev container setup to make working with environments easy.
-
conda
A system-level, binary package and environment manager running on all major operating systems and platforms.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
When you start a Codespace for a project, it will try to use whatever Dev Container you have specified in your repo, else it will try to use a kitchen sink container. That default kitchen sink is can be way too much and so if you will be working with Conda environments with an Anaconda or Miniconda Dev Container template instead.
I often use Conda environments when working on my Python projects, as it helps me manage dependencies for projects outside of just pure Python packages. In porting some of these projects to Codespaces and Dev Containers, I have found some tricks to getting the fastest and most reliable experience with Conda and Codespaces.
You can find a template repo where I have added all of these files into a blank repo that might help test some dev containers and Codespaces yourself!
Tip 1: To use less of your Codespaces resources start with a smaller image like Miniconda or Miniforge and install only what you need.
The other challenge I ran into sometimes was that if I was running a lower memory/storage Codespace instance, when I tried to use Conda from the command line to modify environments, the process would be killed after a few seconds. This turns out to be related to some performance issues Conda has that make it consume a lot of memory when trying to work with the conda-forge installation channel. You can always then just increase the size of the Codespace your are working with (just go to your Codespaces list and use the triple dots to change the settings for a Codespace).
Related posts
- Creating a movie finder app with Streamlit and OMDb API
- Microsoft Docker Development Container Templates
- .devcontainer Containerized environment workflow
- ChatGPT Meets GitHub Codespaces: How I'm Optimizing ChatGPT Quickstart Plugins for Remote Development
- Run self-hosted GitHub runners on GitHub Codespaces (Video Tutorial)