forked from Kaggle/kagglehub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
23 lines (18 loc) · 823 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
ARG PYTHON_VERSION
FROM python:${PYTHON_VERSION}
RUN pip install hatch==1.14.0
# Add only the minimal files required to be able to pre-create the hatch environments.
# If any of these files changes, a new Docker build is necessary. This is why we need
# to only include the minimal set of files.
ADD pyproject.toml /working/pyproject.toml
ADD LICENSE /working/LICENSE
ADD README.md /working/README.md
ADD src/kagglehub/__init__.py /working/src/kagglehub/__init__.py
WORKDIR /working
# Pre-create the hatch environments.
# This drastically cut the time to run commands with the `docker-hatch` wrapper
# since the creation of the environments (including syncing dependencies) is
# only done once when building this image and is skipped later.
RUN hatch env create default
RUN hatch env create lint
ENTRYPOINT ["hatch"]