Porównaj commity

...

19 Commity

Autor SHA1 Wiadomość Data
Matt Fisher 409d4dd4d9
Merge e4c2b41097 into d2f467cef6 2024-04-03 23:03:18 +02:00
Erik Sundell d2f467cef6
Merge pull request #1342 from jupyterhub/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2024-04-02 09:54:26 +02:00
pre-commit-ci[bot] 0e7907f86b
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/asottile/pyupgrade: v3.15.0 → v3.15.2](https://github.com/asottile/pyupgrade/compare/v3.15.0...v3.15.2)
- [github.com/psf/black: 24.1.1 → 24.3.0](https://github.com/psf/black/compare/24.1.1...24.3.0)
2024-04-01 22:10:42 +00:00
Simon Li 243669b928
Merge pull request #1341 from manics/changelog-2024.03.0
Changelog for 2024.03.0
2024-03-31 20:43:31 +02:00
Simon Li d4bb9c14da Changelog for 2024.03.0 2024-03-28 19:13:23 +00:00
Erik Sundell f667caf49c
Merge pull request #1332 from yuvipanda/bump-alpine
Dockerfile: bump alpine from 3.17 to 3.19 and Python 3.10 to 3.11
2024-03-24 23:08:31 +01:00
Erik Sundell 755a32bc2a
Merge pull request #1337 from SylvainCorlay/mamba-1.5.7
Update mamba to 1.5.7 from 1.5.1, and conda to 24.3.0 from 23.7.4
2024-03-24 22:50:58 +01:00
Erik Sundell 91d3f150e5
Use ARG instead of ENV for build time only environment variable 2024-03-24 22:35:15 +01:00
Erik Sundell f121a0d481
Use modern ENV syntax in Dockerfile
The use of `ENV key value` is an old alternative syntax still around for backward compatibility, but may be removed according to https://docs.docker.com/reference/dockerfile/#env.
2024-03-24 22:22:47 +01:00
Erik Sundell 57e4b3f687
Fix unrelated comment 2024-03-24 22:18:23 +01:00
Erik Sundell 920ddd86ac
Update conda from 23.7.4 to 24.3.0 2024-03-24 22:16:05 +01:00
YuviPanda 601fa25291 Don't use --user to install anything 2024-03-22 19:40:41 -07:00
YuviPanda 756e7d1a98 Put everything inside a venv 2024-03-22 19:40:41 -07:00
YuviPanda dd9f6ad2de Bump alpine version used in Dockerfile
Brings us to latest alpine, and to a newer python
2024-03-22 19:40:41 -07:00
Sylvain Corlay 01d818b974 Update to mamba 1.5.7 2024-03-22 21:34:50 +01:00
Matt Fisher e4c2b41097
Correct my misunderstanding and add documentation that would have helped past me
I did not see the "Can I use repo2docker to bootstrap my own
Dockerfile?" FAQ the first time through. I've linked it from the part
that I _did_ see so hopefully the next person through (maybe me in 6
months) won't have the same misunderstanding!
2023-05-18 20:13:10 -06:00
Matt Fisher e1ce6f55b6
Warn of unexpected behavior when creating a Dockerfile from debug output
When creating a Dockerfile from redirecting debug output, `repo2docker`
sees the initially-empty `Dockerfile` and that influences its output
(since `Dockerfile` is empty, `repo2docker` outputs nothing).
2023-05-18 12:01:35 -06:00
Matt Fisher f610e1bbb5
Add link from Dockerfile config file to debug usage 2023-05-18 11:41:45 -06:00
Matt Fisher c2a3750556
Support Sphinx >=6.x
https://github.com/sphinx-doc/sphinx/issues/11094

`extlinks` config expects a formatting slug in the caption portion of
its config. Without it, Sphinx 6.x throws:

    Exception occurred:
      File "/path/to/site-packages/sphinx/ext/extlinks.py", line 103, in role
        title = caption % part
    TypeError: not all arguments converted during string formatting
2023-05-18 11:31:41 -06:00
8 zmienionych plików z 133 dodań i 20 usunięć

Wyświetl plik

@ -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:

Wyświetl plik

@ -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

Wyświetl plik

@ -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))

Wyświetl plik

@ -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.

Wyświetl plik

@ -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)" .``.

Wyświetl plik

@ -106,14 +106,21 @@ 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
.. code-block:: bash
jupyter-repo2docker --debug https://github.com/norvig/pytudes
jupyter-repo2docker --debug https://github.com/norvig/pytudes
This will print the generated ``Dockerfile``, build it, and run it.
@ -122,11 +129,13 @@ pass ``--no-build`` to the commandline. This ``Dockerfile`` output
is for **debugging purposes** of ``repo2docker`` only - it can not
be used by docker directly.
.. code-block:: bash
.. code-block:: bash
jupyter-repo2docker --no-build --debug https://github.com/norvig/pytudes
jupyter-repo2docker --no-build --debug https://github.com/norvig/pytudes
.. _usage-cli:
Command line API
================

Wyświetl plik

@ -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"

Wyświetl plik

@ -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"])