forked from nansencenter/docker-nansat-base
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
2 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM continuumio/miniconda3 as standard | ||
FROM continuumio/miniconda3 | ||
|
||
LABEL maintainer="Anton Korosov <[email protected]>" | ||
LABEL purpose="Python libs for developing and running Nansat" | ||
|
@@ -35,31 +35,3 @@ ENV GDAL_DATA=/opt/conda/share/gdal | |
ENV PROJ_LIB=/opt/conda/share/proj | ||
|
||
WORKDIR /src | ||
|
||
|
||
FROM standard as slim_builder | ||
|
||
RUN pip install conda-pack \ | ||
&& conda create --name to_pack --clone base \ | ||
&& conda-pack -n to_pack -o /tmp/env.tar \ | ||
&& mkdir /venv && tar -C /venv -xf /tmp/env.tar \ | ||
&& /venv/bin/conda-unpack | ||
|
||
FROM debian:buster as slim | ||
|
||
COPY --from=slim_builder /usr/share/MOD44W /usr/share/MOD44W | ||
COPY --from=slim_builder /venv /venv | ||
COPY --from=slim_builder /usr/lib/x86_64-linux-gnu/libXau.so.6* /usr/lib/x86_64-linux-gnu | ||
RUN mkdir -p "/root/.local/share/pythesint" | ||
COPY --from=slim_builder "/root/.local/share/pythesint" "/root/.local/share/pythesint" | ||
|
||
ENV VIRTUAL_ENV='/venv' | ||
ENV PATH="$VIRTUAL_ENV/bin:$PATH" | ||
ENV PYTHONUNBUFFERED=1 | ||
ENV PYTHONPATH=/src | ||
ENV MOD44WPATH=/usr/share/MOD44W | ||
ENV GDAL_DRIVER_PATH=/venv/lib/gdalplugins | ||
ENV GDAL_DATA=/venv/share/gdal | ||
ENV PROJ_LIB=/venv/share/proj | ||
|
||
WORKDIR /src |