diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 00000000..86e38b77 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,23 @@ +FROM python:3.10 + +# Node.js +RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - +RUN apt-get install -y nodejs +RUN npm install -g vsce + +# Rust +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y +ENV PATH="/root/.cargo/bin:${PATH}" + +# Install wasm-pack and wasm-opt +RUN curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh +RUN wget https://github.com/WebAssembly/binaryen/releases/download/version_113/binaryen-version_113-x86_64-linux.tar.gz && \ + tar -zxvf binaryen-version_113-x86_64-linux.tar.gz && \ + mv binaryen-version_113/ /root/.binaryen && \ + rm binaryen-version_113-x86_64-linux.tar.gz +ENV PATH="/root/.binaryen/bin:${PATH}" + +RUN apt-get update && apt-get install -y \ + build-essential \ + libssl-dev \ + pkg-config diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..8777d92f --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,18 @@ +{ + "name": "dev-optuna-dashboard", + "dockerFile": "Dockerfile", + "forwardPorts": [9000], + "containerEnv": {}, + "runArgs": ["--init"], + "postCreateCommand": "./.devcontainer/postCreateCommand.sh", + "customizations": { + "vscode": { + "settings": { + "editor.renderWhitespace": "all" + }, + "extensions": [ + "ms-python.python" + ] + } + } +} diff --git a/.devcontainer/postCreateCommand.sh b/.devcontainer/postCreateCommand.sh new file mode 100755 index 00000000..acad3872 --- /dev/null +++ b/.devcontainer/postCreateCommand.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +npm install +pip install -r requirements.txt