From bbfcb613309e4ed86cf00209b4cd49bce26a71be Mon Sep 17 00:00:00 2001 From: Ganesh Gore Date: Sat, 30 Apr 2022 15:36:21 -0600 Subject: [PATCH] Added Binder interface --- Dockerfile | 37 +++++++++++++++++++++++++++++++++++++ README.md | 1 + 2 files changed, 38 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..634106ccb --- /dev/null +++ b/Dockerfile @@ -0,0 +1,37 @@ +FROM ghcr.io/lnis-uofu/openfpga-master:latest + +# Install node js +RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - +RUN curl -fsSL https://code-server.dev/install.sh | sh +RUN apt-get install -y nodejs +RUN apt-get install tree +RUN code-server --install-extension ms-python.python + +ARG NB_USER=openfpga_user +ARG NB_UID=1000 +ENV USER ${NB_USER} +ENV NB_UID ${NB_UID} +ENV HOME /home/${NB_USER} + +RUN adduser --disabled-password \ + --gecos "Default user" \ + --uid ${NB_UID} \ + ${NB_USER} + +USER root +RUN chown -R ${NB_UID} ${HOME} +RUN chown -R ${NB_UID} /opt/openfpga +USER ${NB_USER} + +ENV PATH $PATH:/home/${NB_USER}/.local/bin + +RUN python3 -m pip install --user --no-cache-dir notebook +RUN python3 -m pip install --user --no-cache-dir jupyterlab +RUN python3 -m pip install --user --no-cache-dir jupyterhub +RUN python3 -m pip install --user --no-cache-dir jupyter-server-proxy +RUN python3 -m pip install --user --no-cache-dir jupyter-vscode-proxy + +RUN npm install @jupyterlab/server-proxy +RUN jupyter serverextension enable --py jupyter_server_proxy +RUN jupyter labextension install @jupyterlab/server-proxy +RUN jupyter lab build diff --git a/README.md b/README.md index 9a9238b94..a112c79bd 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # Getting Started with OpenFPGA [![linux build](https://github.com/LNIS-Projects/OpenFPGA/workflows/linux_build/badge.svg)](https://github.com/LNIS-Projects/OpenFPGA/actions?query=workflow%3Alinux_build) [![Documentation Status](https://readthedocs.org/projects/openfpga/badge/?version=master)](https://openfpga.readthedocs.io/en/master/?badge=master) +Try it: [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/lnis-uofu/OpenFPGA/master?urlpath=lab) ## Introduction