diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..67a63a9 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,28 @@ +ARG UV_VERSION=latest +ARG DEBIAN_VERSION=bookworm + + +FROM ghcr.io/astral-sh/uv:$UV_VERSION AS uv + + +FROM mcr.microsoft.com/vscode/devcontainers/rust:$DEBIAN_VERSION + +RUN apt-get update \ + && apt-get install -y --no-install-recommends \ + # For OpenCV etc... + libgl1 libglib2.0-0 \ + # For protobuf + protobuf-compiler \ + # nodejs dependencies + curl gnupg \ + # To remove the image size, it is recommended refresh the package cache as follows + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + + +# Install Node +RUN curl -sL https://deb.nodesource.com/setup_22.x | bash - \ + && apt-get install nodejs -y \ + && corepack enable pnpm + +COPY --from=uv --chown=vscode: /uv /uvx /bin/ diff --git a/notebooks/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json similarity index 82% rename from notebooks/.devcontainer/devcontainer.json rename to .devcontainer/devcontainer.json index 8e9ddad..f6f1587 100644 --- a/notebooks/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,10 +1,10 @@ { - "name": "scale-notebooks (Jupyter)", + "name": "scale", "build": { "context": "..", "dockerfile": "Dockerfile", "args": { - "UV_VERSION": "0.6.5", + "UV_VERSION": "0.6.9", "DEBIAN_VERSION": "bookworm" } }, @@ -26,7 +26,8 @@ "shardulm94.trailing-spaces", "tamasfe.even-better-toml", "mechatroner.rainbow-csv", - "ms-toolsai.datawrangler" + "ms-toolsai.datawrangler", + "tooltitudeteam.tooltitude-pb" ] } }, @@ -35,6 +36,6 @@ "PYTHONUNBUFFERED": "True", "UV_LINK_MODE": "copy" }, - "postCreateCommand": "uv sync --frozen", + "postCreateCommand": "./.devcontainer/post-create.sh", "remoteUser": "vscode" } diff --git a/.devcontainer/post-create.sh b/.devcontainer/post-create.sh new file mode 100755 index 0000000..bccd96b --- /dev/null +++ b/.devcontainer/post-create.sh @@ -0,0 +1,2 @@ +cd ./notebooks && uv sync --frozen && cd .. +cd ./apps/pyworker && uv sync --frozen && cd .. diff --git a/notebooks/.vscode/settings.json b/.vscode/settings.json similarity index 100% rename from notebooks/.vscode/settings.json rename to .vscode/settings.json diff --git a/apps/pyworker/.devcontainer/Dockerfile b/apps/pyworker/.devcontainer/Dockerfile deleted file mode 100644 index 5691fab..0000000 --- a/apps/pyworker/.devcontainer/Dockerfile +++ /dev/null @@ -1,20 +0,0 @@ -ARG UV_VERSION=latest -ARG DEBIAN_VERSION=bookworm - - -FROM ghcr.io/astral-sh/uv:$UV_VERSION AS uv - - -FROM mcr.microsoft.com/vscode/devcontainers/base:$DEBIAN_VERSION - -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - # For OpenCV etc... - libgl1 libglib2.0-0 \ - # For protobuf - protobuf-compiler \ - # To remove the image size, it is recommended refresh the package cache as follows - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -COPY --from=uv --chown=vscode: /uv /uvx /bin/ diff --git a/apps/pyworker/.devcontainer/devcontainer.json b/apps/pyworker/.devcontainer/devcontainer.json deleted file mode 100644 index 6752c8a..0000000 --- a/apps/pyworker/.devcontainer/devcontainer.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "scale-pyworker (python)", - "build": { - "context": "..", - "dockerfile": "Dockerfile", - "args": { - "UV_VERSION": "0.6.6", - "DEBIAN_VERSION": "bookworm" - } - }, - "customizations": { - "vscode": { - "extensions": [ - "kevinrose.vsc-python-indent", - "mosapride.zenkaku", - "ms-azuretools.vscode-docker", - "ms-python.python", - "ms-toolsai.jupyter", - "njpwerner.autodocstring", - "redhat.vscode-yaml", - "shardulm94.trailing-spaces", - "tamasfe.even-better-toml", - "mechatroner.rainbow-csv", - "tooltitudeteam.tooltitude-pb" - ] - } - }, - "containerEnv": { - "DISPLAY": "dummy", - "PYTHONUNBUFFERED": "True", - "UV_LINK_MODE": "copy" - }, - "postCreateCommand": "uv sync --frozen", - "remoteUser": "vscode" -} diff --git a/apps/pyworker/.vscode/settings.json b/apps/pyworker/.vscode/settings.json deleted file mode 100644 index 8b20fd9..0000000 --- a/apps/pyworker/.vscode/settings.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "explorer.fileNesting.patterns": { - "pyproject.toml": "uv.lock, .python-version", - "settings.yaml": ".secrets.yaml" - }, - "explorer.fileNesting.enabled": true -} \ No newline at end of file diff --git a/apps/reactapp/.devcontainer/devcontainer.json b/apps/reactapp/.devcontainer/devcontainer.json deleted file mode 100644 index 66fdc3f..0000000 --- a/apps/reactapp/.devcontainer/devcontainer.json +++ /dev/null @@ -1,22 +0,0 @@ -// For format details, see https://aka.ms/devcontainer.json. For config options, see the -// README at: https://github.com/devcontainers/templates/tree/main/src/javascript-node -{ - "name": "Node.js", - // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/javascript-node:1-22-bookworm" - - // Features to add to the dev container. More info: https://containers.dev/features. - // "features": {}, - - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], - - // Use 'postCreateCommand' to run commands after the container is created. - // "postCreateCommand": "yarn install", - - // Configure tool-specific properties. - // "customizations": {}, - - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" -} diff --git a/apps/webapi/.devcontainer/Dockerfile b/apps/webapi/.devcontainer/Dockerfile deleted file mode 100644 index 0f43e51..0000000 --- a/apps/webapi/.devcontainer/Dockerfile +++ /dev/null @@ -1,11 +0,0 @@ -ARG IMAGE_TAG=latest - -FROM mcr.microsoft.com/devcontainers/rust:$IMAGE_TAG - -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - # For protobuf - protobuf-compiler \ - # To remove the image size, it is recommended refresh the package cache as follows - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* diff --git a/apps/webapi/.devcontainer/devcontainer.json b/apps/webapi/.devcontainer/devcontainer.json deleted file mode 100644 index 055390c..0000000 --- a/apps/webapi/.devcontainer/devcontainer.json +++ /dev/null @@ -1,44 +0,0 @@ -// For format details, see https://aka.ms/devcontainer.json. For config options, see the -// README at: https://github.com/devcontainers/templates/tree/main/src/rust -{ - "name": "scale-webapi (Rust)", - "build": { - "context": "..", - "dockerfile": "Dockerfile", - "args": { - "IMAGE_TAG": "1-1-bookworm" - } - }, - "customizations": { - "vscode": { - "extensions": [ - "tooltitudeteam.tooltitude-pb", - "ms-azuretools.vscode-docker" - ] - } - } - - // Use 'mounts' to make the cargo cache persistent in a Docker Volume. - // "mounts": [ - // { - // "source": "devcontainer-cargo-cache-${devcontainerId}", - // "target": "/usr/local/cargo", - // "type": "volume" - // } - // ] - - // Features to add to the dev container. More info: https://containers.dev/features. - // "features": {}, - - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], - - // Use 'postCreateCommand' to run commands after the container is created. - // "postCreateCommand": "rustc --version", - - // Configure tool-specific properties. - // "customizations": {}, - - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" -} diff --git a/notebooks/.devcontainer/Dockerfile b/notebooks/.devcontainer/Dockerfile deleted file mode 100644 index f13e6dc..0000000 --- a/notebooks/.devcontainer/Dockerfile +++ /dev/null @@ -1,19 +0,0 @@ -ARG UV_VERSION=latest -ARG DEBIAN_VERSION=bookworm - - -FROM ghcr.io/astral-sh/uv:$UV_VERSION AS uv - - -FROM mcr.microsoft.com/vscode/devcontainers/base:$DEBIAN_VERSION - -# hadolint ignore=DL3008 -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - # For OpenCV etc... - libgl1 libglib2.0-0 \ - # To remove the image size, it is recommended refresh the package cache as follows - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -COPY --from=uv --chown=vscode: /uv /uvx /bin/