kopia lustrzana https://github.com/jupyterhub/repo2docker
Porównaj commity
19 Commity
ef10fe4ae3
...
409d4dd4d9
Autor | SHA1 | Data |
---|---|---|
Matt Fisher | 409d4dd4d9 | |
Erik Sundell | d2f467cef6 | |
pre-commit-ci[bot] | 0e7907f86b | |
Simon Li | 243669b928 | |
Simon Li | d4bb9c14da | |
Erik Sundell | f667caf49c | |
Erik Sundell | 755a32bc2a | |
Erik Sundell | 91d3f150e5 | |
Erik Sundell | f121a0d481 | |
Erik Sundell | 57e4b3f687 | |
Erik Sundell | 920ddd86ac | |
YuviPanda | 601fa25291 | |
YuviPanda | 756e7d1a98 | |
YuviPanda | dd9f6ad2de | |
Sylvain Corlay | 01d818b974 | |
Matt Fisher | e4c2b41097 | |
Matt Fisher | e1ce6f55b6 | |
Matt Fisher | f610e1bbb5 | |
Matt Fisher | c2a3750556 |
|
@ -11,7 +11,7 @@
|
|||
repos:
|
||||
# Autoformat: Python code, syntax patterns are modernized
|
||||
- repo: https://github.com/asottile/pyupgrade
|
||||
rev: v3.15.0
|
||||
rev: v3.15.2
|
||||
hooks:
|
||||
- id: pyupgrade
|
||||
args:
|
||||
|
@ -23,7 +23,7 @@ repos:
|
|||
|
||||
# Autoformat: Python code
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 24.1.1
|
||||
rev: 24.3.0
|
||||
hooks:
|
||||
- id: black
|
||||
args:
|
||||
|
|
24
Dockerfile
24
Dockerfile
|
@ -1,16 +1,21 @@
|
|||
# syntax = docker/dockerfile:1.3
|
||||
ARG ALPINE_VERSION=3.17
|
||||
ARG ALPINE_VERSION=3.19
|
||||
FROM alpine:${ALPINE_VERSION}
|
||||
|
||||
RUN apk add --no-cache git python3 python3-dev py3-pip py3-setuptools build-base
|
||||
|
||||
# build wheels in first image
|
||||
# build wheels in a build stage
|
||||
ARG VIRTUAL_ENV=/opt/venv
|
||||
ENV PATH=${VIRTUAL_ENV}/bin:${PATH}
|
||||
|
||||
RUN python3 -m venv ${VIRTUAL_ENV}
|
||||
|
||||
ADD . /tmp/src
|
||||
RUN cd /tmp/src && git clean -xfd && git status
|
||||
RUN mkdir /tmp/wheelhouse \
|
||||
&& cd /tmp/wheelhouse \
|
||||
&& pip3 install wheel \
|
||||
&& pip3 wheel --no-cache-dir /tmp/src \
|
||||
&& pip install wheel \
|
||||
&& pip wheel --no-cache-dir /tmp/src \
|
||||
&& ls -l /tmp/wheelhouse
|
||||
|
||||
FROM alpine:${ALPINE_VERSION}
|
||||
|
@ -18,13 +23,18 @@ FROM alpine:${ALPINE_VERSION}
|
|||
# install python, git, bash, mercurial
|
||||
RUN apk add --no-cache git git-lfs python3 py3-pip py3-setuptools bash docker mercurial
|
||||
|
||||
ARG VIRTUAL_ENV=/opt/venv
|
||||
ENV PATH=${VIRTUAL_ENV}/bin:${PATH}
|
||||
|
||||
RUN python3 -m venv ${VIRTUAL_ENV}
|
||||
|
||||
# install hg-evolve (Mercurial extensions)
|
||||
RUN pip3 install hg-evolve --user --no-cache-dir
|
||||
RUN pip install hg-evolve --no-cache-dir
|
||||
|
||||
# install repo2docker
|
||||
COPY --from=0 /tmp/wheelhouse /tmp/wheelhouse
|
||||
RUN pip3 install --no-cache-dir --ignore-installed --no-deps /tmp/wheelhouse/*.whl \
|
||||
&& pip3 list
|
||||
RUN pip install --no-cache-dir --ignore-installed --no-deps /tmp/wheelhouse/*.whl \
|
||||
&& pip list
|
||||
|
||||
# add git-credential helper
|
||||
COPY ./docker/git-credential-env /usr/local/bin/git-credential-env
|
||||
|
|
|
@ -1,5 +1,63 @@
|
|||
# Changelog
|
||||
|
||||
## Version 2024.03.0
|
||||
|
||||
([full changelog](https://github.com/jupyterhub/repo2docker/compare/2023.06.0...2024.01.03))
|
||||
|
||||
### New features added
|
||||
|
||||
- Implement support for dockerignore and containerignore [#1205](https://github.com/jupyterhub/repo2docker/pull/1205) ([@sgaist](https://github.com/sgaist))
|
||||
|
||||
### Enhancements made
|
||||
|
||||
- rstudio: log-level info to stderr [#1317](https://github.com/jupyterhub/repo2docker/pull/1317) ([@manics](https://github.com/manics))
|
||||
|
||||
### Bugs fixed
|
||||
|
||||
- Get Zenodo working again [#1315](https://github.com/jupyterhub/repo2docker/pull/1315) ([@manics](https://github.com/manics))
|
||||
|
||||
### Maintenance and upkeep improvements
|
||||
|
||||
- Update mamba to 1.5.7 from 1.5.1, and conda to 24.3.0 from 23.7.4 [#1337](https://github.com/jupyterhub/repo2docker/pull/1337) ([@SylvainCorlay](https://github.com/SylvainCorlay))
|
||||
- Dockerfile: bump alpine from 3.17 to 3.19 and Python 3.10 to 3.11 [#1332](https://github.com/jupyterhub/repo2docker/pull/1332) ([@yuvipanda](https://github.com/yuvipanda))
|
||||
- Upgrade base image from to Ubuntu 22.04 from 18.04 [#1287](https://github.com/jupyterhub/repo2docker/pull/1287) ([@yuvipanda](https://github.com/yuvipanda))
|
||||
|
||||
### Documentation improvements
|
||||
|
||||
- Add Ubuntu 22.04 upgrade guide [#1309](https://github.com/jupyterhub/repo2docker/pull/1309) ([@manics](https://github.com/manics))
|
||||
- Update version of R available [#1288](https://github.com/jupyterhub/repo2docker/pull/1288) ([@yuvipanda](https://github.com/yuvipanda))
|
||||
- Add changelog for 2023.06.0 [#1286](https://github.com/jupyterhub/repo2docker/pull/1286) ([@yuvipanda](https://github.com/yuvipanda))
|
||||
|
||||
### Other merged PRs
|
||||
|
||||
- [pre-commit.ci] pre-commit autoupdate [#1333](https://github.com/jupyterhub/repo2docker/pull/1333) ([@pre-commit-ci](https://github.com/pre-commit-ci))
|
||||
- build(deps): bump codecov/codecov-action from 3 to 4 [#1331](https://github.com/jupyterhub/repo2docker/pull/1331) ([@dependabot](https://github.com/dependabot))
|
||||
- Support pytest=8 [#1330](https://github.com/jupyterhub/repo2docker/pull/1330) ([@manics](https://github.com/manics))
|
||||
- Update versioneer [#1329](https://github.com/jupyterhub/repo2docker/pull/1329) ([@TimoRoth](https://github.com/TimoRoth))
|
||||
- build(deps): bump actions/setup-python from 4 to 5 [#1328](https://github.com/jupyterhub/repo2docker/pull/1328) ([@dependabot](https://github.com/dependabot))
|
||||
- build(deps): bump actions/upload-artifact from 3 to 4 [#1327](https://github.com/jupyterhub/repo2docker/pull/1327) ([@dependabot](https://github.com/dependabot))
|
||||
- Add NYCU Dataverse [#1326](https://github.com/jupyterhub/repo2docker/pull/1326) ([@twtw](https://github.com/twtw))
|
||||
- [pre-commit.ci] pre-commit autoupdate [#1322](https://github.com/jupyterhub/repo2docker/pull/1322) ([@pre-commit-ci](https://github.com/pre-commit-ci))
|
||||
- New domain for Edmond MPG repository [#1321](https://github.com/jupyterhub/repo2docker/pull/1321) ([@haarli](https://github.com/haarli))
|
||||
- [pre-commit.ci] pre-commit autoupdate [#1319](https://github.com/jupyterhub/repo2docker/pull/1319) ([@pre-commit-ci](https://github.com/pre-commit-ci))
|
||||
- [MRG] docs: Add base_image parameter example. [#1318](https://github.com/jupyterhub/repo2docker/pull/1318) ([@hiroyuki-sato](https://github.com/hiroyuki-sato))
|
||||
- Upgrade mamba and refreeze [#1313](https://github.com/jupyterhub/repo2docker/pull/1313) ([@manics](https://github.com/manics))
|
||||
- r: Bump version of rsession-proxy [#1310](https://github.com/jupyterhub/repo2docker/pull/1310) ([@yuvipanda](https://github.com/yuvipanda))
|
||||
- build(deps): bump actions/checkout from 3 to 4 [#1308](https://github.com/jupyterhub/repo2docker/pull/1308) ([@dependabot](https://github.com/dependabot))
|
||||
- build(deps): bump docker/build-push-action from 4 to 5 [#1307](https://github.com/jupyterhub/repo2docker/pull/1307) ([@dependabot](https://github.com/dependabot))
|
||||
- build(deps): bump docker/setup-qemu-action from 2 to 3 [#1306](https://github.com/jupyterhub/repo2docker/pull/1306) ([@dependabot](https://github.com/dependabot))
|
||||
- build(deps): bump docker/setup-buildx-action from 2 to 3 [#1305](https://github.com/jupyterhub/repo2docker/pull/1305) ([@dependabot](https://github.com/dependabot))
|
||||
- Update conda and mamba [#1299](https://github.com/jupyterhub/repo2docker/pull/1299) ([@SylvainCorlay](https://github.com/SylvainCorlay))
|
||||
- Point to official documentation for handling JupyterLab workspace [#1294](https://github.com/jupyterhub/repo2docker/pull/1294) ([@fcollonval](https://github.com/fcollonval))
|
||||
- Fix rstudio-build selection [#1293](https://github.com/jupyterhub/repo2docker/pull/1293) ([@yamaton](https://github.com/yamaton))
|
||||
- [pre-commit.ci] pre-commit autoupdate [#1291](https://github.com/jupyterhub/repo2docker/pull/1291) ([@pre-commit-ci](https://github.com/pre-commit-ci))
|
||||
|
||||
### Contributors to this release
|
||||
|
||||
([GitHub contributors page for this release](https://github.com/jupyterhub/repo2docker/graphs/contributors?from=2023-06-13&to=2024-03-28&type=c))
|
||||
|
||||
[@annakrystalli](https://github.com/search?q=repo%3Ajupyterhub%2Frepo2docker+involves%3Aannakrystalli+updated%3A2023-06-13..2024-03-28&type=Issues) | [@betatim](https://github.com/search?q=repo%3Ajupyterhub%2Frepo2docker+involves%3Abetatim+updated%3A2023-06-13..2024-03-28&type=Issues) | [@bollwyvl](https://github.com/search?q=repo%3Ajupyterhub%2Frepo2docker+involves%3Abollwyvl+updated%3A2023-06-13..2024-03-28&type=Issues) | [@consideRatio](https://github.com/search?q=repo%3Ajupyterhub%2Frepo2docker+involves%3AconsideRatio+updated%3A2023-06-13..2024-03-28&type=Issues) | [@dependabot](https://github.com/search?q=repo%3Ajupyterhub%2Frepo2docker+involves%3Adependabot+updated%3A2023-06-13..2024-03-28&type=Issues) | [@dolfinus](https://github.com/search?q=repo%3Ajupyterhub%2Frepo2docker+involves%3Adolfinus+updated%3A2023-06-13..2024-03-28&type=Issues) | [@fcollonval](https://github.com/search?q=repo%3Ajupyterhub%2Frepo2docker+involves%3Afcollonval+updated%3A2023-06-13..2024-03-28&type=Issues) | [@felder](https://github.com/search?q=repo%3Ajupyterhub%2Frepo2docker+involves%3Afelder+updated%3A2023-06-13..2024-03-28&type=Issues) | [@haarli](https://github.com/search?q=repo%3Ajupyterhub%2Frepo2docker+involves%3Ahaarli+updated%3A2023-06-13..2024-03-28&type=Issues) | [@hiroyuki-sato](https://github.com/search?q=repo%3Ajupyterhub%2Frepo2docker+involves%3Ahiroyuki-sato+updated%3A2023-06-13..2024-03-28&type=Issues) | [@manics](https://github.com/search?q=repo%3Ajupyterhub%2Frepo2docker+involves%3Amanics+updated%3A2023-06-13..2024-03-28&type=Issues) | [@mathieuboudreau](https://github.com/search?q=repo%3Ajupyterhub%2Frepo2docker+involves%3Amathieuboudreau+updated%3A2023-06-13..2024-03-28&type=Issues) | [@minrk](https://github.com/search?q=repo%3Ajupyterhub%2Frepo2docker+involves%3Aminrk+updated%3A2023-06-13..2024-03-28&type=Issues) | [@pre-commit-ci](https://github.com/search?q=repo%3Ajupyterhub%2Frepo2docker+involves%3Apre-commit-ci+updated%3A2023-06-13..2024-03-28&type=Issues) | [@rgaiacs](https://github.com/search?q=repo%3Ajupyterhub%2Frepo2docker+involves%3Argaiacs+updated%3A2023-06-13..2024-03-28&type=Issues) | [@ryanlovett](https://github.com/search?q=repo%3Ajupyterhub%2Frepo2docker+involves%3Aryanlovett+updated%3A2023-06-13..2024-03-28&type=Issues) | [@sgaist](https://github.com/search?q=repo%3Ajupyterhub%2Frepo2docker+involves%3Asgaist+updated%3A2023-06-13..2024-03-28&type=Issues) | [@SylvainCorlay](https://github.com/search?q=repo%3Ajupyterhub%2Frepo2docker+involves%3ASylvainCorlay+updated%3A2023-06-13..2024-03-28&type=Issues) | [@TimoRoth](https://github.com/search?q=repo%3Ajupyterhub%2Frepo2docker+involves%3ATimoRoth+updated%3A2023-06-13..2024-03-28&type=Issues) | [@twtw](https://github.com/search?q=repo%3Ajupyterhub%2Frepo2docker+involves%3Atwtw+updated%3A2023-06-13..2024-03-28&type=Issues) | [@welcome](https://github.com/search?q=repo%3Ajupyterhub%2Frepo2docker+involves%3Awelcome+updated%3A2023-06-13..2024-03-28&type=Issues) | [@yamaton](https://github.com/search?q=repo%3Ajupyterhub%2Frepo2docker+involves%3Ayamaton+updated%3A2023-06-13..2024-03-28&type=Issues) | [@yuvipanda](https://github.com/search?q=repo%3Ajupyterhub%2Frepo2docker+involves%3Ayuvipanda+updated%3A2023-06-13..2024-03-28&type=Issues)
|
||||
|
||||
## Version 2023.06.0
|
||||
|
||||
([full changelog](https://github.com/jupyterhub/repo2docker/compare/2022.10.0...2023.06.0))
|
||||
|
|
|
@ -242,10 +242,13 @@ In the majority of cases, providing your own Dockerfile is not necessary as the
|
|||
images provide core functionality, compact image sizes, and efficient builds. We recommend
|
||||
trying the other configuration files before deciding to use your own Dockerfile.
|
||||
|
||||
With Dockerfiles, a regular Docker build will be performed.
|
||||
Try the ``--appendix`` :ref:`CLI flag <usage-cli>` as a last resort. If you
|
||||
still can't achieve your goals, you should create a Dockerfile from scratch to
|
||||
define your image.
|
||||
|
||||
.. note::
|
||||
If a Dockerfile is present, all other configuration files will be ignored.
|
||||
With Dockerfiles, a regular Docker build will be performed. All other
|
||||
configuration files will be ignored.
|
||||
|
||||
See the `Advanced Binder Documentation <https://mybinder.readthedocs.io/en/latest/tutorials/dockerfile.html>`_ for
|
||||
best-practices with Dockerfiles.
|
||||
|
|
|
@ -115,6 +115,9 @@ flag for each variable that you want to define.
|
|||
|
||||
For example ``jupyter-repo2docker -e VAR1=val1 -e VAR2=val2 ...``
|
||||
|
||||
|
||||
.. _faq-dockerfile-bootstrap:
|
||||
|
||||
Can I use repo2docker to bootstrap my own Dockerfile?
|
||||
-----------------------------------------------------
|
||||
|
||||
|
@ -189,3 +192,33 @@ tool called `source2image <https://github.com/openshift/source-to-image/>`_.
|
|||
This is an excellent open tool for containerization, but we
|
||||
ultimately decided that it did not fit the use-case we wanted to address. For more information,
|
||||
`here <https://github.com/yuvipanda/words/blob/fd096dd49d87e624acd8bdf6d13c0cecb930bb3f/content/post/why-not-s2i.md>`_ is a short blog post about the decision and the reasoning behind it.
|
||||
|
||||
|
||||
Where are my ``man`` pages?
|
||||
---------------------------
|
||||
|
||||
The base image used by ``repo2docker`` is `Minimal Ubuntu
|
||||
<https://wiki.ubuntu.com/Minimal>`_ version 18. In Minimal Ubuntu, ``man``
|
||||
pages are disabled to reduce image size. If your use case is interactive
|
||||
computing or education, you may want to re-enable ``man`` pages. To do this,
|
||||
use the ``--appendix`` :ref:`CLI flag <usage-cli>` to pass in additional
|
||||
``Dockerfile`` instructions, for example:
|
||||
|
||||
.. code-block:: dockerfile
|
||||
|
||||
# Re-enable man pages disabled in Ubuntu 18 minimal image
|
||||
# https://wiki.ubuntu.com/Minimal
|
||||
USER root
|
||||
RUN yes | unminimize
|
||||
# NOTE: $NB_PYTHON_PREFIX is the same as $CONDA_PREFIX at run-time.
|
||||
# $CONDA_PREFIX isn't available in this context.
|
||||
# NOTE: Prepending ensures a working path; if $MANPATH was previously empty,
|
||||
# the trailing colon ensures that system paths are searched.
|
||||
ENV MANPATH="${NB_PYTHON_PREFIX}/share/man:${MANPATH}"
|
||||
RUN mandb
|
||||
|
||||
# Revert to default user
|
||||
USER ${NB_USER}
|
||||
|
||||
This appendix can be used by, for example, writing it to a file named
|
||||
``appendix`` and executing ``repo2docker --appendix "$(cat appendix)" .``.
|
||||
|
|
|
@ -106,9 +106,16 @@ by ``repo2docker`` to see how to configure the build process.
|
|||
:ref:`configuration files <config-files>`.
|
||||
|
||||
|
||||
.. _usage-debugging-with-debug-and-no-build:
|
||||
|
||||
Debugging repo2docker with ``--debug`` and ``--no-build``
|
||||
=========================================================
|
||||
|
||||
.. warning::
|
||||
|
||||
This feature is *not* for bootstrapping a custom Dockerfile. Please see the
|
||||
:ref:`relevant FAQ entry <faq-dockerfile-bootstrap>`.
|
||||
|
||||
To debug the docker image being built, pass the ``--debug`` parameter:
|
||||
|
||||
.. code-block:: bash
|
||||
|
@ -127,6 +134,8 @@ be used by docker directly.
|
|||
jupyter-repo2docker --no-build --debug https://github.com/norvig/pytudes
|
||||
|
||||
|
||||
.. _usage-cli:
|
||||
|
||||
Command line API
|
||||
================
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@ set -ex
|
|||
|
||||
cd $(dirname $0)
|
||||
|
||||
export MAMBA_VERSION=1.5.1
|
||||
export CONDA_VERSION=23.7.4
|
||||
export MAMBA_VERSION=1.5.7
|
||||
export CONDA_VERSION=24.3.0
|
||||
|
||||
URL="https://anaconda.org/conda-forge/micromamba/${MAMBA_VERSION}/download/${CONDA_PLATFORM}/micromamba-${MAMBA_VERSION}-0.tar.bz2"
|
||||
|
||||
|
|
|
@ -16,13 +16,13 @@ v = out.split()[1]
|
|||
assert v[:3] == "3.5", out
|
||||
|
||||
out = sh(["micromamba", "--version"])
|
||||
assert out == "1.5.1", out
|
||||
assert out == "1.5.7", out
|
||||
|
||||
out = sh(["mamba", "--version"])
|
||||
assert (
|
||||
out
|
||||
== """mamba 1.5.1
|
||||
conda 23.7.4"""
|
||||
== """mamba 1.5.7
|
||||
conda 24.3.0"""
|
||||
), out
|
||||
|
||||
sh([kernel_python, "-c", "import numpy"])
|
||||
|
|
Ładowanie…
Reference in New Issue