diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index eb7a0f6..9349478 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,5 +1,5 @@ { - "image": "ubuntu:22.04", + "image": "ghcr.io/digital-defiance/nlp-metaformer-devcontainer:latest", // "build": { // "dockerfile": "Dockerfile" // }, @@ -7,16 +7,6 @@ // "--gpus", // "all" // ], - "features": { - "ghcr.io/devcontainers/features/nvidia-cuda:1": {}, - "ghcr.io/duduribeiro/devcontainer-features/neovim:1": { "version": "nightly" }, - "ghcr.io/itsmechlark/features/1password:1": {}, - "ghcr.io/devcontainers/features/github-cli:1": {}, - "ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}, - "ghcr.io/devcontainers/features/node:1": { "version": "20.16"}, - "ghcr.io/jungaretti/features/make:1": {}, - "ghcr.io/devcontainers/features/rust:1": {} - }, "postCreateCommand": "./.devcontainer/postCreateCommand.sh", "mounts": [ { diff --git a/.devcontainer/pre-build/devcontainer.json b/.devcontainer/pre-build/devcontainer.json new file mode 100644 index 0000000..3e81b3d --- /dev/null +++ b/.devcontainer/pre-build/devcontainer.json @@ -0,0 +1,20 @@ +{ + "image": "ubuntu:22.04", + // "build": { + // "dockerfile": "Dockerfile" + // }, + // "runArgs": [ + // "--gpus", + // "all" + // ], + "features": { + "ghcr.io/devcontainers/features/nvidia-cuda:1": {}, + "ghcr.io/duduribeiro/devcontainer-features/neovim:1": { "version": "nightly" }, + "ghcr.io/itsmechlark/features/1password:1": {}, + "ghcr.io/devcontainers/features/github-cli:1": {}, + "ghcr.io/devcontainers/features/docker-outside-of-docker:1": {}, + "ghcr.io/devcontainers/features/node:1": { "version": "20.16"}, + "ghcr.io/jungaretti/features/make:1": {}, + "ghcr.io/devcontainers/features/rust:1": {} + } +} diff --git a/.github/workflows/pre-build-dev-container.yml b/.github/workflows/pre-build-dev-container.yml index c6e5bb9..e396199 100644 --- a/.github/workflows/pre-build-dev-container.yml +++ b/.github/workflows/pre-build-dev-container.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: push: paths: - - '.github/.devcontainer/devcontainer.json' + - '.github/.devcontainer/pre-build/devcontainer.json' - '.github/workflows/pre-build-dev-container.yml' branches: - "main" @@ -39,6 +39,7 @@ jobs: name: Pre-build dev container image uses: devcontainers/ci@v0.3 with: + subFolder: .devcontainer/pre-build imageName: ghcr.io/${{ env.GITHUB_REPOSITORY_LOWER }}-devcontainer cacheFrom: ghcr.io/${{ env.GITHUB_REPOSITORY_LOWER }}-devcontainer push: always