-
Notifications
You must be signed in to change notification settings - Fork 43
/
slim.Dockerfile
104 lines (90 loc) · 3.56 KB
/
slim.Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# Build wheels
FROM python:3.12-slim as build
# Need git for setuptools_scm
RUN apt-get update \
&& apt-get install -y --no-install-recommends git \
&& apt-get purge -y --auto-remove \
&& rm -rf /var/lib/apt/lists/*
COPY . /opt/build-context/
WORKDIR /opt/build-context
RUN python -m pip install --upgrade pip wheel setuptools
RUN sh .circleci/make_wheels.sh
RUN mv ~/wheels /opt/build-context/
RUN echo "pylibmc>=1.5.1\nmatplotlib\npyvips\nsimplejpeg\n" \
> /opt/build-context/wheels/requirements.txt
# Geospatial Sources
FROM python:3.12-slim as geo
COPY --from=build /opt/build-context/wheels /opt/wheels
LABEL maintainer="Kitware, Inc. <[email protected]>"
LABEL repo="https://github.com/girder/large_image"
# NOTE: this does not install any girder3 packages
RUN pip install \
--find-links https://girder.github.io/large_image_wheels \
--find-links=/opt/wheels \
-r /opt/wheels/requirements.txt \
/opt/wheels/large_image-*.whl \
/opt/wheels/large_image_source_gdal*.whl \
/opt/wheels/large_image_source_mapnik*.whl \
/opt/wheels/large_image_source_tiff*.whl \
/opt/wheels/large_image_source_pil*.whl \
/opt/wheels/large_image_converter*.whl
# All Sources
FROM python:3.12-slim as all
COPY --from=build /opt/build-context/wheels /opt/wheels
LABEL maintainer="Kitware, Inc. <[email protected]>"
LABEL repo="https://github.com/girder/large_image"
# NOTE: this does not install any girder3 packages
RUN pip install \
--find-links https://girder.github.io/large_image_wheels \
--find-links=/opt/wheels \
-r /opt/wheels/requirements.txt \
/opt/wheels/large_image-*.whl \
/opt/wheels/large_image_converter*.whl \
$(ls -1 /opt/wheels/large_image_source*.whl)
# All Sources and Girder Packages
FROM python:3.12-slim as girder
COPY --from=build /opt/build-context/wheels /opt/wheels
LABEL maintainer="Kitware, Inc. <[email protected]>"
LABEL repo="https://github.com/girder/large_image"
# NOTE: this does not install any girder3 packages
RUN pip install \
--find-links https://girder.github.io/large_image_wheels \
--find-links=/opt/wheels \
-r /opt/wheels/requirements.txt \
$(ls -1 /opt/wheels/*.whl)
# Jupyter all sources
FROM jupyter/base-notebook:python-3.11.6 as jupyter
COPY --from=build /opt/build-context/wheels /opt/wheels
LABEL maintainer="Kitware, Inc. <[email protected]>"
LABEL repo="https://github.com/girder/large_image"
RUN pip install \
--find-links https://girder.github.io/large_image_wheels \
--find-links=/opt/wheels \
-r /opt/wheels/requirements.txt \
/opt/wheels/large_image-*.whl \
/opt/wheels/large_image_converter*.whl \
$(ls -1 /opt/wheels/large_image_source*.whl)
RUN pip install \
ipyleaflet \
jupyter-server-proxy
ENV LARGE_IMAGE_JUPYTER_PROXY='/proxy/'
# Jupyter Geospatial sources
FROM jupyter/base-notebook:python-3.11.6 as jupyter-geo
COPY --from=build /opt/build-context/wheels /opt/wheels
LABEL maintainer="Kitware, Inc. <[email protected]>"
LABEL repo="https://github.com/girder/large_image"
# NOTE: this does not install any girder3 packages
RUN pip install \
--find-links https://girder.github.io/large_image_wheels \
--find-links=/opt/wheels \
-r /opt/wheels/requirements.txt \
/opt/wheels/large_image-*.whl \
/opt/wheels/large_image_source_gdal*.whl \
/opt/wheels/large_image_source_mapnik*.whl \
/opt/wheels/large_image_source_tiff*.whl \
/opt/wheels/large_image_source_pil*.whl \
/opt/wheels/large_image_converter*.whl
RUN pip install \
ipyleaflet \
jupyter-server-proxy
ENV LARGE_IMAGE_JUPYTER_PROXY='/proxy/'