Skip to content

Storage Error when creating Codespace with current devcontainer configuration #32374

Description

@maaz7409

Issue Summary

When i try to create codespace on this repository, it fails due to out-of-space error (32 GB codespace).

2026-09-19 09:11:24.435Z: #6 extracting sha256:f4a5ac0bdce11b83995edd30699c5f02db7e2d301c14668c0c2941c4efba2999 20.9s
2026-09-19 09:11:29.560Z: #6 extracting sha256:f4a5ac0bdce11b83995edd30699c5f02db7e2d301c14668c0c2941c4efba2999 26.1s
2026-09-19 09:11:40.866Z: #6 extracting sha256:f4a5ac0bdce11b83995edd30699c5f02db7e2d301c14668c0c2941c4efba2999 37.4s
- 2026-09-19 09:11:43.562Z: ERROR: failed to register layer: write /home/codespace/.local/lib/python3.12/site-packages/torch/lib/libtorch_cpu.so: no space left on device
2026-09-19 09:11:44.027Z: ------
 > [dev_containers_target_stage 1/6] FROM mcr.microsoft.com/devcontainers/universal:2@sha256:dca6a985ffbbc74007a13b6f56ac0fbbc5febae081350b66e865a5549338134b:
 ------
2026-09-19 09:11:44.029Z: Dockerfile.extended:12
 --------------------
  10 |     RUN chmod -R 0755 /tmp/build-features/
  11 |     
  12 | >>> FROM $_DEV_CONTAINERS_BASE_IMAGE AS dev_containers_target_stage
  13 |     
  14 |     USER root2026-09-19 09:11:44.029Z: 
 --------------------
Dockerfile.extended:7
 --------------------
   5 |     
   6 |     
   7 | >>> FROM $_DEV_CONTAINERS_BASE_IMAGE AS dev_containers_feature_content_normalize
   8 |     USER root
   9 |     COPY --from=dev_containers_feature_content_source devcontainer-features.builtin.env /tmp/build-features/
 --------------------
- ERROR: failed to build: failed to solve: failed to register layer: write /home/codespace/.local/lib/python3.12/site-packages/torch/lib/libtorch_cpu.so: no space left on device
2026-09-19 09:11:44.036Z: Stop: Run: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 --build-context dev_containers_feature_content_source=/tmp/devcontainercli-root/container-features/0.83.3-1789808775017 --build-arg _DEV_CONTAINERS_BASE_IMAGE=mcr.microsoft.com/devcontainers/universal:2 --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp --target dev_containers_target_stage -f /tmp/devcontainercli-root/container-features/0.83.3-1789808775017/Dockerfile.extended -t vsc-matplotlib-e756e6eb92f585b1533d5a04ee5efe0ae6fae27b41e0b63c206359f2f9175ad1-features /var/lib/docker/codespacemount/.persistedshare/empty-folder
2026-09-19 09:11:44.036Z: Error: Command failed: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 --build-context dev_containers_feature_content_source=/tmp/devcontainercli-root/container-features/0.83.3-1789808775017 --build-arg _DEV_CONTAINERS_BASE_IMAGE=mcr.microsoft.com/devcontainers/universal:2 --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp --target dev_containers_target_stage -f /tmp/devcontainercli-root/container-features/0.83.3-1789808775017/Dockerfile.extended -t vsc-matplotlib-e756e6eb92f585b1533d5a04ee5efe0ae6fae27b41e0b63c206359f2f9175ad1-features /var/lib/docker/codespacemount/.persistedshare/empty-folder
2026-09-19 09:11:

I tried to fix this by using base:ubuntu image and adding features like ssh, conda

( base ubuntu doesnt come with conda, so it throws another following error if conda is not added)

The following has been added in your "/home/vscode/.bashrc" file

# >>> mamba initialize >>>
# !! Contents within this block are managed by 'micromamba shell init' !!
export MAMBA_EXE='/home/vscode/.local/bin/micromamba';
export MAMBA_ROOT_PREFIX='/home/vscode/micromamba';
__mamba_setup="$("$MAMBA_EXE" shell hook --shell bash --root-prefix "$MAMBA_ROOT_PREFIX" 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__mamba_setup"
else
    alias micromamba="$MAMBA_EXE"  # Fallback on help from micromamba activate
fi
unset __mamba_setup
# <<< mamba initialize <<<

2026-09-19 09:38:27.226Z: Please restart your shell to activate micromamba or run the following:\n
  source ~/.bashrc (or ~/.zshrc, ~/.xonshrc, ~/.config/fish/config.fish, ...)
- 2026-09-19 09:38:27.259Z: .devcontainer/setup.sh: line 7: conda: command not found
2026-09-19 09:38:27.266Z: onCreateCommand from devcontainer.json failed with exit code 127. Skipping any further user-provided commands.

Hence, this configuration files need changes (mcr.microsoft.com/devcontainers/universal:2 image is old and downloads lot of unnecessary bloats, filling up space).

Steps to Reproduce

  1. Click on the green <> Code button to create a codespace, click on three dots and select New with options.

  2. Here, configuration will be set. Click on create codespace

  3. Codespace creation begins. It takes few minutes (around 7-8). Observe creation log. Once it fails, it creates a recovery container (alpine image).

  4. After codespace is created, check /vscode/workspaces/.codespaces/.persistedshare/creation.log for creation.log file. Here the issue can be confirmed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions