Commit 2247a32c authored by Jochen Schulz's avatar Jochen Schulz
Browse files

change docker and ci

parent 0633cc89
Pipeline #219147 failed with stage
in 1 minute and 27 seconds
......@@ -3,6 +3,9 @@ image: jochenschulz/jupyterbook
cache:
paths:
- _build
- .venv
key: "${CI_COMMIT_REF_SLUG}"
build:
script:
......@@ -12,6 +15,9 @@ build:
- chmod 644 ~/.ssh/known_hosts
- eval $(ssh-agent -s)
- echo "$DEPLOYMENT_SSH_KEY" | tr -d '\r' | ssh-add -
# set up poetry
- poetry config virtualenvs.in-project true
- poetry install --no-dev --no-root
# build
- mkdir -p _build/.jupyter_cache/
- jupyter-book build --toc _toc_cas.yml --config _config_cas.yml --path-output _build/cas .
......
FROM python:3.9.6-slim-buster
ARG YOUR_ENV
ENV YOUR_ENV=${YOUR_ENV} \
PYTHONFAULTHANDLER=1 \
PYTHONUNBUFFERED=1 \
PYTHONHASHSEED=random \
PIP_NO_CACHE_DIR=off \
PIP_DISABLE_PIP_VERSION_CHECK=on \
PIP_DEFAULT_TIMEOUT=100 \
POETRY_VERSION=1.0.10
ENV PATH="/opt/poetry/bin:${PATH}"
# System deps:
RUN apt-get update
RUN apt-get -q -y install build-essential locales openssh-client rsync
RUN pip install "poetry==$POETRY_VERSION"
RUN apt-get -q -y install build-essential locales openssh-client rsync curl
RUN locale-gen en_US.UTF-8
RUN locale-gen de_DE.UTF-8
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | POETRY_HOME=/opt/poetry/ python -
# Copy only requirements to cache them in docker layer
WORKDIR /code
COPY poetry.lock pyproject.toml /code/
# Project initialization:
RUN poetry config virtualenvs.create false \
&& poetry install --no-interaction --no-ansi
# Creating folders, and files for a project:
#COPY . /code
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment