diff --git a/.gitignore b/.gitignore index c1dc307..ac88e2a 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ /.vscode /cpm_modules .DS_Store -.idea \ No newline at end of file +.idea +.cache \ No newline at end of file diff --git a/Dockerfile b/.gitpod.dockerfile similarity index 63% rename from Dockerfile rename to .gitpod.dockerfile index 15d0e5b..ff12788 100644 --- a/Dockerfile +++ b/.gitpod.dockerfile @@ -1,7 +1,6 @@ -FROM ubuntu:latest +FROM gitpod/workspace-full:latest USER root -WORKDIR /xbasic ARG DEBIAN_FRONTEND=noninteractive RUN apt-get update \ && apt-get install -y --no-install-recommends \ @@ -10,14 +9,18 @@ RUN apt-get update \ cmake \ make \ g++ \ + ninja-build \ && rm -rf /var/lib/apt/lists/* -ENV PATH="/xbasic/miniconda3/bin:${PATH}" -ARG PATH="/xbasic/miniconda3/bin:${PATH}" +USER gitpod RUN wget --no-check-certificate \ https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \ - && mkdir /xbasic/.conda \ - && bash Miniconda3-latest-Linux-x86_64.sh -b -p /xbasic/miniconda3 \ + && bash Miniconda3-latest-Linux-x86_64.sh -b \ && rm -f Miniconda3-latest-Linux-x86_64.sh -RUN conda install -c conda-forge jupyter xeus xtl nlohmann_json cppzmq -y && conda init +ENV PATH=$PATH:$HOME/miniconda3 +ENV PATH=$PATH:$HOME/miniconda3/bin + +RUN conda install -c conda-forge jupyter xeus xtl nlohmann_json cppzmq -y +RUN conda init + diff --git a/.gitpod.yml b/.gitpod.yml index 61bf113..1a53f79 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,12 +1,9 @@ image: - file: Dockerfile + file: .gitpod.dockerfile ports: - port: 8888 visibility: public - onOpen: notify -workspaceLocation: xbasic -checkoutLocation: xbasic + onOpen: open-browser tasks: - - init: | - export PATH="/home/gitpod/miniconda3/bin/:$PATH" - conda activate base + - command: conda activate base + - command: echo -e "\nalias jupyternb=\"jupyter notebook --NotebookApp.allow_origin=\'$(gp url 8888)\' --NotebookApp.token='' --NotebookApp.password=''\" >> ~/.bashrc