-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
23 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,26 @@ | ||
FROM python:3.11-bullseye as builder | ||
RUN groupadd --gid 1000 renku && \ | ||
adduser --gid 1000 --uid 1000 renku | ||
useradd --gid 1000 --uid 1000 --create-home renku | ||
USER 1000:1000 | ||
WORKDIR /app | ||
WORKDIR /home/renku/app | ||
RUN python3 -m pip install --user pipx && \ | ||
python3 -m pipx ensurepath && \ | ||
/home/renku/.local/bin/pipx install poetry | ||
RUN /home/renku/.local/bin/poetry config virtualenvs.in-project true && \ | ||
/home/renku/.local/bin/poetry config virtualenvs.options.no-setuptools true && \ | ||
/home/renku/.local/bin/poetry config virtualenvs.options.no-pip true | ||
/home/renku/.local/bin/pipx install poetry && \ | ||
python3 -m venv .env | ||
COPY poetry.lock pyproject.toml ./ | ||
RUN /home/renku/.local/bin/poetry install --only main --no-root | ||
RUN /home/renku/.local/bin/poetry export --only main --without-hashes -o requirements.txt && \ | ||
.env/bin/pip install -r requirements.txt --prefer-binary | ||
|
||
FROM python:3.11-slim-bullseye | ||
RUN apt-get update && apt-get install -y \ | ||
tini curl && \ | ||
rm -rf /var/lib/apt/lists/* && \ | ||
groupadd --gid 1000 renku && \ | ||
adduser --gid 1000 --uid 1000 renku | ||
useradd --gid 1000 --uid 1000 --create-home renku | ||
USER 1000:1000 | ||
WORKDIR /app | ||
COPY --from=builder /app/.venv .venv | ||
WORKDIR /home/renku/app | ||
COPY --from=builder /home/renku/app/.env .env | ||
COPY renku_notebooks renku_notebooks | ||
COPY resource_schema_migrations resource_schema_migrations | ||
ENTRYPOINT ["tini", "-g", "--"] | ||
CMD [".venv/bin/gunicorn", "-b 0.0.0.0:8000", "renku_notebooks.wsgi:app", "-k gevent"] | ||
CMD [".env/bin/gunicorn", "-b 0.0.0.0:8000", "renku_notebooks.wsgi:app", "-k gevent"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters