devcontainers-contrib / templates

📂 Pre-made .devcontainer folders for starting your next project
MIT License
14 stars 12 forks source link

Fix devcontainer configuration #6

Closed jcbhmr closed 1 year ago

jcbhmr commented 1 year ago

Currently it errors in GitHub Codespaces:

2023-01-02 02:15:12.324Z: #10 extracting sha256:d89fc30901ae69eb383fe706db336fc64c2869df9b05503acf27d664b4747110 47.1s
2023-01-02 02:15:17.383Z: #10 extracting sha256:d89fc30901ae69eb383fe706db336fc64c2869df9b05503acf27d664b4747110 52.1s
2023-01-02 02:15:23.100Z: #10 extracting sha256:d89fc30901ae69eb383fe706db336fc64c2869df9b05503acf27d664b4747110 57.8s
2023-01-02 02:15:28.112Z: #10 extracting sha256:d89fc30901ae69eb383fe706db336fc64c2869df9b05503acf27d664b4747110 62.9s
2023-01-02 02:15:30.520Z: #10 ERROR: failed to register layer: ApplyLayer exit status 1 stdout:  stderr: write /home/codespace/.local/lib/python3.10/site-packages/torch/lib/libtorch_cuda_cu.so: no space left on device
2023-01-02 02:15:30.604Z: ------
2023-01-02 02:15:30.604Z:  > [dev_containers_feature_content_normalize 1/3] FROM mcr.microsoft.com/devcontainers/universal:2.1.3-focal@sha256:a0ee9ebef10ed5b1889d58a039b478cce153beb6ec955681232ef47cbd394eb4:
2023-01-02 02:15:30.604Z: 
2023-01-02 02:15:30.605Z: ------
2023-01-02 02:15:30.605Z: 
2023-01-02 02:15:30.632Z: ERROR: failed to solve: failed to register layer: ApplyLayer exit status 1 stdout:  stderr: write /home/codespace/.local/lib/python3.10/site-packages/torch/lib/libtorch_cuda_cu.so: no space left on device
2023-01-02 02:15:30.688Z: Stop (228644 ms): Run: docker buildx build --load --build-context dev_containers_feature_content_source=/tmp/devcontainercli-root/container-features/0.26.0-1672625499649 --build-arg _DEV_CONTAINERS_BASE_IMAGE=mcr.microsoft.com/devcontainers/universal:2.1.3-focal --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp --target dev_containers_target_stage -t vsc-templates-cfae15ea720226f927c3667aae3187fa-features -f /tmp/devcontainercli-root/container-features/0.26.0-1672625499649/Dockerfile.extended /var/lib/docker/codespacemount/.persistedshare/empty-folder
2023-01-02 02:15:30.689Z: Error: Command failed: docker buildx build --load --build-context dev_containers_feature_content_source=/tmp/devcontainercli-root/container-features/0.26.0-1672625499649 --build-arg _DEV_CONTAINERS_BASE_IMAGE=mcr.microsoft.com/devcontainers/universal:2.1.3-focal --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp --target dev_containers_target_stage -t vsc-templates-cfae15ea720226f927c3667aae3187fa-features -f /tmp/devcontainercli-root/container-features/0.26.0-1672625499649/Dockerfile.extended /var/lib/docker/codespacemount/.persistedshare/empty-folder
2023-01-02 02:15:30.701Z:     at Kne (/usr/lib/node_modules/@microsoft/vscode-dev-containers-cli/dist/spec-node/devContainersSpecCLI.js:1865:1355)
2023-01-02 02:15:30.716Z:     at x7 (/usr/lib/node_modules/@microsoft/vscode-dev-containers-cli/dist/spec-node/devContainersSpecCLI.js:1865:1291)
2023-01-02 02:15:30.716Z:     at processTicksAndRejections (internal/process/task_queues.js:95:5)
2023-01-02 02:15:30.717Z:     at async oie (/usr/lib/node_modules/@microsoft/vscode-dev-containers-cli/dist/spec-node/devContainersSpecCLI.js:1871:2093)
2023-01-02 02:15:30.717Z:     at async qf (/usr/lib/node_modules/@microsoft/vscode-dev-containers-cli/dist/spec-node/devContainersSpecCLI.js:1871:3239)
2023-01-02 02:15:30.717Z:     at async Mse (/usr/lib/node_modules/@microsoft/vscode-dev-containers-cli/dist/spec-node/devContainersSpecCLI.js:1995:16211)
2023-01-02 02:15:30.718Z:     at async Lse (/usr/lib/node_modules/@microsoft/vscode-dev-containers-cli/dist/spec-node/devContainersSpecCLI.js:1995:15965)
2023-01-02 02:15:30.718Z: Stop (231745 ms): Run: /usr/bin/node /usr/lib/node_modules/@microsoft/vscode-dev-containers-cli/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /var/lib/docker/codespacemount/.persistedshare --container-data-folder .vscode-remote/data/Machine --container-system-data-folder /var/vscode-remote --workspace-folder /var/lib/docker/codespacemount/workspace/templates --id-label Type=codespaces --log-level info --log-format json --config /var/lib/docker/codespacemount/workspace/templates/.devcontainer/devcontainer.json --override-config /root/.codespaces/shared/merged_devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=bind,source=/.codespaces/agent/mount/cache,target=/vscode --skip-post-create --update-remote-user-uid-default never --mount-workspace-git-root false
2023-01-02 02:15:30.718Z: Exit code 1

====================================== ERROR ====================================
2023-01-02 02:15:30.720Z: Failed to create container.
=================================================================================
2023-01-02 02:15:30.727Z: Error: Command failed: /usr/bin/node /usr/lib/node_modules/@microsoft/vscode-dev-containers-cli/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /var/lib/docker/codespacemount/.persistedshare --container-data-folder .vscode-remote/data/Machine --container-system-data-folder /var/vscode-remote --workspace-folder /var/lib/docker/codespacemount/workspace/templates --id-label Type=codespaces --log-level info --log-format json --config /var/lib/docker/codespacemount/workspace/templates/.devcontainer/devcontainer.json --override-config /root/.codespaces/shared/merged_devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=bind,source=/.codespaces/agent/mount/cache,target=/vscode --skip-post-create --update-remote-user-uid-default never --mount-workspace-git-root false
2023-01-02 02:15:30.732Z: Error Code: 1302

====================================== ERROR ====================================
2023-01-02 02:15:30.754Z: Container creation failed.
=================================================================================

Specifically:

ERROR: failed to register layer: ApplyLayer exit status 1 stdout:  stderr: write /home/codespace/.local/lib/python3.10/site-packages/torch/lib/libtorch_cuda_cu.so: no space left on device
ERROR: failed to solve: failed to register layer: ApplyLayer exit status 1 stdout:  stderr: write /home/codespace/.local/lib/python3.10/site-packages/torch/lib/libtorch_cuda_cu.so: no space left on device

Supposedly GitHub Codespaces gives you 2 cores and 32GB of storage. To use that all up is quite not good for a feature (or whatever caused this)!

@jcbhmr ➜ /workspaces/templates (main) $ df -h
Filesystem      Size  Used Avail Use% Mounted on
overlay          32G  954M   29G   4% /
tmpfs            64M     0   64M   0% /dev
tmpfs           2.0G     0  2.0G   0% /sys/fs/cgroup
shm              64M     0   64M   0% /dev/shm
/dev/sdb1        16G  140K   15G   1% /tmp
/dev/sda1        29G   12G   18G  40% /vscode
/dev/loop0       32G  954M   29G   4% /workspaces
tmpfs           2.0G     0  2.0G   0% /proc/acpi
tmpfs           2.0G     0  2.0G   0% /proc/scsi
tmpfs           2.0G     0  2.0G   0% /sys/firmware

image

jcbhmr commented 1 year ago

Given that this is coming from the Python torch package, which seems to be a machine learning helper (https://pytorch.org/), I think that it's something to do with Python installing pytorch when it shouldn't?