From d4890c700548f5861f09a12c66effbaee74cafd2 Mon Sep 17 00:00:00 2001 From: Kai Schlamp Date: Mon, 10 Jun 2024 22:15:45 +0000 Subject: [PATCH] Setup devcontainer for GitHub Codespaces --- .devcontainer/Dockerfile | 3 --- .devcontainer/devcontainer.json | 5 ++--- .devcontainer/postCreateCommand.sh | 5 +++++ 3 files changed, 7 insertions(+), 6 deletions(-) create mode 100755 .devcontainer/postCreateCommand.sh diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index d2c542bb..92cb93bc 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -13,9 +13,6 @@ RUN sudo apt-get update && \ USER vscode -RUN git clone https://github.com/ingydotnet/git-subrepo $HOME/.git-subrepo && \ - printf "\nsource \$HOME/.git-subrepo/.rc\n" >> $HOME/.bashrc - # pipx is already installed in the base devcontainers Python image RUN pipx install invoke && \ invoke --print-completion-script=bash >> ~/.bash_completion diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 08ae52cf..63a1e2bb 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -5,14 +5,13 @@ "features": { "ghcr.io/devcontainers/features/docker-in-docker:2": { // Install Docker CE instead of an (by default) older Moby version - "moby": false, - "version": "25.0.3" + "moby": false }, "ghcr.io/devcontainers/features/node:1": {} }, // https://github.com/orgs/community/discussions/50403 // "initializeCommand": "docker system prune --all --force", - "postCreateCommand": "poetry install && poetry run invoke init-workspace && poetry run invoke download-llm -m mistral-7b-q2", + "postCreateCommand": "./.devcontainer/postCreateCommand.sh", "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/postCreateCommand.sh b/.devcontainer/postCreateCommand.sh new file mode 100755 index 00000000..06f59b83 --- /dev/null +++ b/.devcontainer/postCreateCommand.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +poetry install +poetry run invoke init-workspace +poetry run invoke download-llm -m tinyllama-1b-q2