diff options
| author | adamjanovsky | 2022-05-27 08:00:09 +0200 |
|---|---|---|
| committer | GitHub | 2022-05-27 08:00:09 +0200 |
| commit | 23832d00a541b2d42859bd3f1aeaca4c514bcb82 (patch) | |
| tree | 4f322859b8321ba88a47abbdcccbb7c50179e72e /Dockerfile | |
| parent | 0c12f7fec7778279a9c6ab1fc3d1b6868e7dcd86 (diff) | |
| parent | 1de0b977015e625db30a98f22cac4f098fbb404c (diff) | |
| download | sec-certs-23832d00a541b2d42859bd3f1aeaca4c514bcb82.tar.gz sec-certs-23832d00a541b2d42859bd3f1aeaca4c514bcb82.tar.zst sec-certs-23832d00a541b2d42859bd3f1aeaca4c514bcb82.zip | |
Merge pull request #196 from crocs-muni/issue/195-Docs
Docs
Diffstat (limited to 'Dockerfile')
| -rw-r--r-- | Dockerfile | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..ad76f40a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,60 @@ +FROM ubuntu:jammy-20220428 + +ENV USER="user" +ENV NB_UID=1000 +ENV HOME /home/${USER} + +#installing dependencies +RUN apt-get update +RUN apt-get install python3 -y +RUN apt-get install python3-pip -y +RUN apt-get install python3-venv -y +RUN apt-get install git -y +RUN apt-get install curl -y + +# Install dependencies fo PyPDF2 and pdftotext +RUN DEBIAN_FRONTEND="noninteractive" apt-get -y install tzdata +RUN apt-get install build-essential libpoppler-cpp-dev pkg-config python3-dev -y +RUN apt-get install libqpdf-dev -y +RUN apt-get install default-jdk -y +RUN apt-get install graphviz -y + +RUN adduser --disabled-password \ + --gecos "Default user" \ + --uid ${NB_UID} \ + ${USER} + +RUN chown -R ${NB_UID} ${HOME} +USER ${USER} +WORKDIR ${HOME} + +# Download only snapshot of repository +RUN \ + curl -L https://api.github.com/repos/crocs-muni/sec-certs/tarball/main > sec-certs.tar.gz && \ + mkdir sec-certs && \ + tar zxf sec-certs.tar.gz --strip-components=1 --directory sec-certs && \ + rm sec-certs.tar.gz + +WORKDIR ${HOME}/sec-certs + +# Create virtual environment +ENV VENV_PATH=${HOME}/venv +RUN python3 -m venv ${VENV_PATH} +ENV PATH="${VENV_PATH}/bin:$PATH" + +# Install dependencies, notebook is because of mybinder.org +RUN \ + pip3 install -U pip && \ + pip3 install wheel && \ + pip3 install -r requirements/requirements.txt && \ + pip3 install --no-cache notebook jupyterlab && \ + pip3 install -e . + +# Download spacy language model +RUN python3 -m spacy download en_core_web_sm + +# #just to be sure that pdftotext is in $PATH +ENV PATH /usr/bin/pdftotext:${PATH} + +# # Run the application: +# CMD ["python3", "./cc_cli.py"] |
