"docker/requirements.txt" did not exist on "64b61d828954dd050fda9f88ec6fa48f559124ef"
Dockerfile 1.34 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
32
33
34
35
# base image
ARG HARBOR
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
LABEL MAINTAINER="Bo Zhang <bozhang@nao.cas.cn>"
LABEL PIPELINE_ID=${PIPELINE_ID}
LABEL BUILD=${BUILD}
LABEL CREATED=${CREATED}

# run as root
USER root
# install system softwares
RUN --mount=type=cache,id=apt,target=/var/cache/apt \
    apt-get update && apt-get install -y \
    git \
    && rm -rf /var/lib/apt/lists/*

# run as csst
USER csst
# copy VCS roots into image
COPY --chown=csst:csst . /pipeline
# install packages & requirements
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 \
BO ZHANG's avatar
tweaks    
BO ZHANG committed
36
37
    && pip install pkg/csst-dag \
    && pip install -r pkg/csst-dag/requirements.txt \
BO ZHANG's avatar
tweaks    
BO ZHANG committed
38
    && rm -rf pkg
BO ZHANG's avatar
BO ZHANG committed
39
40
41
42
43
44
45
# change workdir
WORKDIR /pipeline/output


# 设置容器启动时默认执行的命令(这里以提供一个帮助信息为例)
# 实际使用时,你可能会通过docker run覆盖这个命令来调用具体的工具
CMD ["python", "-c", "import csst_dag; print('csst_dag is available. Use docker run <image> <command> to execute specific functions.')"]