Skip to content

Commit e5a704e

Browse files
committed
feat: Add git into docker images
1 parent 704dc38 commit e5a704e

File tree

5 files changed

+420
-317
lines changed

5 files changed

+420
-317
lines changed

.pre-commit-config.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v2.3.0
4+
hooks:
5+
- id: check-yaml
6+
- id: end-of-file-fixer
7+
- id: trailing-whitespace
8+
- repo: https://github.com/psf/black
9+
rev: 22.10.0
10+
hooks:
11+
- id: black

docker/jupyter/Dockerfile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,10 @@ RUN apt-get update \
5050
# deps for installing poetry
5151
curl \
5252
# deps for building python deps
53-
build-essential \
54-
# git
55-
git
53+
build-essential
5654

5755
# install poetry - respects $POETRY_VERSION & $POETRY_HOME
58-
# The --mount will mount the buildx cache directory to where
56+
# The --mount will mount the buildx cache directory to where
5957
# Poetry and Pip store their cache so that they can re-use it
6058
RUN --mount=type=cache,target=/root/.cache \
6159
curl -sSL https://install.python-poetry.org | python3 -
@@ -76,12 +74,13 @@ RUN --mount=type=cache,target=/root/.cache \
7674
FROM python-base as production
7775
COPY --from=builder-base $PYSETUP_PATH $PYSETUP_PATH
7876

77+
RUN apt-get update && apt-get install -y git
78+
7979
ADD ../../configs/jupyter_lab_config.py /root/.jupyter/jupyter_lab_config.py
8080
ADD ../../configs/jupytext.toml /root/.config/jupytext.toml
8181

8282
WORKDIR /workshop
8383
EXPOSE 8888 4141
8484
ENV SHELL="/bin/bash"
85-
ENV GIT_PYTHON_REFRESH="quiet"
8685

8786
ENTRYPOINT ["jupyter", "lab"]

docker/mlflow/Dockerfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ENV PYTHONUNBUFFERED=1 \
1616
PYTHONDONTWRITEBYTECODE=1 \
1717
\
1818
# pip
19-
PIP_DISABLE_PIP_VERSION_CHECK=on \
19+
PIP_DISABLE_PIP_VERSION_CHECK=on
2020
PIP_DEFAULT_TIMEOUT=100 \
2121
\
2222
# poetry
@@ -51,8 +51,7 @@ RUN apt-get update \
5151
curl \
5252
# deps for building python deps
5353
build-essential \
54-
gcc \
55-
git
54+
gcc
5655

5756
# install poetry - respects $POETRY_VERSION & $POETRY_HOME
5857
# The --mount will mount the buildx cache directory to where
@@ -76,11 +75,9 @@ RUN --mount=type=cache,target=/root/.cache \
7675
FROM python-base as production
7776
COPY --from=builder-base $PYSETUP_PATH $PYSETUP_PATH
7877

79-
8078
WORKDIR /ml_data
8179
EXPOSE 5001
8280
ENV SHELL="/bin/bash"
83-
ENV GIT_PYTHON_REFRESH="quiet"
8481

8582

8683
ENTRYPOINT ["mlflow","server","--host","0.0.0.0","--port","5001"]

0 commit comments

Comments
 (0)