2023-02-12 13:36:53 -06:00
|
|
|
FROM ghcr.io/lnis-uofu/openfpga-master:8d555772
|
2022-04-30 16:36:21 -05:00
|
|
|
|
|
|
|
# Install node js
|
2023-02-02 16:43:40 -06:00
|
|
|
USER root
|
2023-07-16 22:54:30 -05:00
|
|
|
RUN curl -sL https://deb.nodesource.com/setup_18.x | bash -
|
2022-04-30 16:36:21 -05:00
|
|
|
RUN curl -fsSL https://code-server.dev/install.sh | sh
|
|
|
|
RUN apt-get install -y nodejs
|
|
|
|
RUN apt-get install tree
|
2023-02-12 12:50:11 -06:00
|
|
|
|
|
|
|
# = = = = = = = VSCODE Extension installation = = = = = = =
|
|
|
|
# Python support in vscode
|
2022-04-30 16:36:21 -05:00
|
|
|
RUN code-server --install-extension ms-python.python
|
2023-02-12 12:50:11 -06:00
|
|
|
# For CSV file alignment
|
2023-02-11 19:24:20 -06:00
|
|
|
RUN code-server --install-extension mechatroner.rainbow-csv
|
2023-02-12 12:50:11 -06:00
|
|
|
# For VCD Viewer
|
2023-02-12 13:36:21 -06:00
|
|
|
RUN wget -O _wavetrace.gz https://marketplace.visualstudio.com/_apis/public/gallery/publishers/wavetrace/vsextensions/wavetrace/1.1.2/vspackage
|
2023-02-11 19:24:20 -06:00
|
|
|
RUN code-server --install-extension wavetrace.wavetrace
|
2023-02-12 12:50:11 -06:00
|
|
|
# For XML Linting
|
2023-02-11 19:24:20 -06:00
|
|
|
RUN code-server --install-extension dotjoshjohnson.xml
|
2023-02-12 12:50:11 -06:00
|
|
|
# For git graphs
|
|
|
|
RUN code-server --install-extension mhutchie.git-graph
|
2023-02-12 13:36:21 -06:00
|
|
|
# verilog-linter
|
|
|
|
RUN code-server --install-extension mshr-h.veriloghdl
|
2023-02-12 12:50:11 -06:00
|
|
|
# = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
|
2022-04-30 16:36:21 -05:00
|
|
|
|
2023-02-02 21:43:40 -06:00
|
|
|
RUN usermod -u 2000 openfpga_user
|
|
|
|
RUN groupmod -g 2000 openfpga_user
|
|
|
|
|
2023-02-03 15:19:43 -06:00
|
|
|
ARG NB_USER=user_openfpga
|
2022-04-30 16:36:21 -05:00
|
|
|
ARG NB_UID=1000
|
|
|
|
ENV USER ${NB_USER}
|
|
|
|
ENV NB_UID ${NB_UID}
|
|
|
|
ENV HOME /home/${NB_USER}
|
|
|
|
|
2023-02-02 21:43:40 -06:00
|
|
|
RUN adduser --disabled-password \
|
|
|
|
--gecos "Default user" \
|
|
|
|
--uid ${NB_UID} \
|
|
|
|
${NB_USER}
|
|
|
|
|
2022-04-30 16:36:21 -05:00
|
|
|
RUN chown -R ${NB_UID} ${HOME}
|
|
|
|
RUN chown -R ${NB_UID} /opt/openfpga
|
2023-02-02 21:43:40 -06:00
|
|
|
|
|
|
|
WORKDIR ${HOME}
|
2022-04-30 16:36:21 -05:00
|
|
|
USER ${NB_USER}
|
|
|
|
|
|
|
|
ENV PATH $PATH:/home/${NB_USER}/.local/bin
|
|
|
|
|
2023-02-02 16:49:21 -06:00
|
|
|
RUN python3 -m pip install --upgrade pip
|
2022-04-30 16:36:21 -05:00
|
|
|
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
|
2023-07-16 22:54:30 -05:00
|
|
|
RUN python3 -m pip install --user --no-cache-dir jupyter-server
|
2022-04-30 16:36:21 -05:00
|
|
|
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 lab build
|
2023-02-02 17:12:53 -06:00
|
|
|
WORKDIR /opt/openfpga/
|
2022-05-03 15:20:10 -05:00
|
|
|
RUN git reset --hard HEAD
|
2022-05-02 11:08:19 -05:00
|
|
|
|
|
|
|
# Set up terminal
|
2022-05-02 13:46:07 -05:00
|
|
|
RUN echo 'export PS1="\[$(tput bold)\]\[\033[38;5;220m\]\u\[$(tput sgr0)\]:\[$(tput sgr0)\]\[$(tput bold)\]\[\033[38;5;14m\]\W\[$(tput sgr0)\]\\$\[$(tput sgr0) \]"' >> ~/.bashrc
|
2022-05-03 15:03:52 -05:00
|
|
|
RUN echo 'alias codeopen="code-server -r "' >> ~/.bashrc
|
|
|
|
RUN mkdir -p .vscode && echo '{"files.associations": {"*.openfpga": "shellscript"},"workbench.colorTheme": "Monokai"}' > .vscode/settings.json
|