Dockerfile 1.46 KB
Newer Older
BO ZHANG's avatar
BO ZHANG committed
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
# base image
ARG HARBOR
# CHANGE BASE IMAGE
FROM ${HARBOR}/csst/miniconda3-py312:latest
# declare variables
ARG PIPELINE_ID
ARG BUILD
ARG CREATED
# set environment variables
ENV PIPELINE_ID=${PIPELINE_ID} BUILD=${BUILD} CREATED=${CREATED}
# label info
# CHANGE MAINTAINER
LABEL MAINTAINER="Bo Zhang <bozhang@nao.cas.cn>"
LABEL PIPELINE_ID=${PIPELINE_ID}
LABEL BUILD=${BUILD}
LABEL CREATED=${CREATED}

USER root
# libfftw3-dev libatlas-base-dev liblapack-dev are for sextractor-phot
RUN --mount=type=cache,id=apt,target=/var/cache/apt \
    apt-get update && apt-get install -y \
    libcfitsio10 libfftw3-dev libatlas-base-dev liblapack-dev \
    && rm -rf /var/lib/apt/lists/*
# use libcfitsio10 as 9
#RUN cp /usr/lib/x86_64-linux-gnu/libcfitsio.so.10 /usr/lib/x86_64-linux-gnu/libcfitsio.so.9

USER csst
WORKDIR /pipeline
# copy VCS roots
COPY --chown=csst:csst . /pipeline
# install ASTROMATIC
BO ZHANG's avatar
BO ZHANG committed
32
33
#RUN chmod +x /pipeline/bin/* && ln -s /pipeline/bin/swarp /pipeline/bin/SWarp
#ENV PATH /pipeline/bin:$PATH
BO ZHANG's avatar
BO ZHANG committed
34
35
36
37
38
39
40
41
42
43
44
45
46
# install Python packages
RUN --mount=type=cache,id=pip,uid=9000,gid=9000,target=/home/csst/.cache \
    pip install pkg/ccds \
    && pip install pkg/csst-dfs-client \
    && pip install pkg/csst_common \
    && pip install pkg/csst_dadel \
    && pip install pkg/csst_fs \
    && pip install --no-deps pkg/csst_msc_catalog \
    && pip install --no-deps pkg/csst_msc_qc2 \
    && pip install -r requirements.txt \
    && rm requirements.txt
# change workdir
WORKDIR /pipeline/output