-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
43 lines (34 loc) · 1.34 KB
/
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
FROM registry.access.redhat.com/ubi9/ubi-minimal AS builder
ENV MAMBA_ROOT_PREFIX=/opt/conda
ENV MAMBA_DISABLE_LOCKFILE=TRUE
RUN microdnf -y update && \
microdnf -y install tar bzip2 && \
microdnf -y clean all
COPY environment.yaml /tmp
RUN mkdir /opt/conda && \
curl -Ls https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -xvj -C /usr/bin/ --strip-components=1 bin/micromamba && \
micromamba shell init -s bash && \
mv /root/.bashrc /opt/conda/.bashrc && \
source /opt/conda/.bashrc && \
micromamba activate && \
micromamba install -c conda-forge --no-deps dask && \
micromamba install -y -f /tmp/environment.yaml && \
rm /tmp/environment.yaml && \
pip install --no-dependencies trollmoves==0.15.2 && \
pip cache purge && \
# Remove git with all its dependencies
micromamba remove -y git && \
# Remove pip, leave dependencies intact
micromamba remove --force -y pip && \
# Clean all mamba caches, inluding packages
micromamba clean -af -y && \
chgrp -R 0 /opt/conda && \
chmod -R g=u /opt/conda
FROM registry.access.redhat.com/ubi9/ubi-minimal
RUN microdnf -y update && \
microdnf -y clean all
COPY --from=builder /opt/conda /opt/conda
COPY --from=builder /usr/bin/micromamba /usr/bin/
COPY entrypoint.sh /usr/bin/
EXPOSE 40000
ENTRYPOINT ["/usr/bin/entrypoint.sh"]