diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 000000000..189125c04 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,3 @@ +FROM python:3.9 +RUN apt-get -y update +RUN apt-get -y install git diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..35af77463 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,8 @@ +{ + "name": "MARO Dev Container", + "build": { + "context": "..", + "dockerfile": "Dockerfile" + }, + "postCreateCommand": "bash scripts/install_maro.sh && pip install -r ./requirements.dev.txt" +} diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..314766e91 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +* text=auto eol=lf +*.{cmd,[cC][mM][dD]} text eol=crlf +*.{bat,[bB][aA][tT]} text eol=crlf diff --git a/README.md b/README.md index 2750a51cd..f1b4c562f 100644 --- a/README.md +++ b/README.md @@ -147,6 +147,17 @@ of user-defined functions for message auto-handling, cluster provision, and job $Env:PYTHONPATH=PATH-TO-MARO ``` +## Use MARO in [VSCode DevContainer](https://code.visualstudio.com/docs/devcontainers/containers) + +- Prerequisites + - Install Docker on your local machine. + - Make sure your Docker daemon is running. +- Open MARO folder with VSCode. +- Open command palette by pressing `Ctrl/Cmd` + `Shift` + `P`. +- Type `Dev Containers: Rebuild and Reopen in Container` in the command palette and then prese `Enter` to start building dev container. +- The building process might takes a few minutes. After it is done, you are all set! + + ## Quick Example ```python diff --git a/requirements.dev.txt b/requirements.dev.txt index 6c78701de..04adce20f 100644 --- a/requirements.dev.txt +++ b/requirements.dev.txt @@ -20,6 +20,7 @@ Flask_SocketIO>=5.2.0 flloat==0.3.0 geopy>=2.0.0 holidays>=0.10.3 +ipython Jinja2>=2.11.3 kubernetes>=21.7.0 markupsafe==2.0.1