-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathDockerfile
49 lines (41 loc) · 1.76 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
44
45
46
47
48
49
FROM continuumio/miniconda3
LABEL authors="Bo Zhang"
RUN mkdir -p /laspec \
&& mkdir -p /slam \
WORKDIR /slam
# switch to tsinghua apt source
#RUN sed -i "s/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/g" /etc/apt/sources.list.d/debian.sources
#RUN --mount=type=cache,id=apt,target=/var/cache/apt \
#RUN apt-get update --fix-missing && \
# apt-get install -y wget bzip2 ca-certificates curl git gcc g++ apt-utils && \
# apt-get clean && \
# rm -rf /var/lib/apt/lists/*
# ban NumPy multithreading
ENV OMP_NUM_THREADS=1 \
MKL_NUM_THREADS=1 \
OPENBLAS_NUM_THREADS=1 \
NUMEXPR_NUM_THREADS=1 \
VECLIB_MAXIMUM_THREADS=1
# copy laspec
COPY .condarc /root/
COPY laspec /laspec/laspec
COPY setup.py /laspec/
COPY README.md /laspec/
COPY requirements.txt /laspec/
COPY projects/2024-12-22-speczoo/predict.py /slam/
COPY projects/2024-12-22-speczoo/sp.joblib /slam/
COPY projects/2024-12-22-speczoo/upgrade_astropy.py /slam/
# switch to tsinghua pip/conda source
RUN --mount=type=cache,id=pip,uid=0,gid=0,target=/root/.cache \
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple/ \
&& pip install ipython \
&& pip install /laspec \
&& ipython /slam/upgrade_astropy.py
# CMD
CMD ["python", "/slam/predict.py"]
# docker build -t astroslam:latest -f Dockerfile --no-cache .
# docker run astroslam:latest pip list
# docker run -v /nfsdata/share/lamost/dr11-v1.0/fits/20191026/HD213633N331403V01/spec-58783-HD213633N331403V01_sp14-205.fits.gz:/slam/input.fits astroslam
# docker run -it -v /nfsdata/share/lamost/dr11-v1.0/fits/20191026/HD213633N331403V01/spec-58783-HD213633N331403V01_sp14-205.fits.gz:/slam/input.fits astroslam:latest bash
#http://data.astropy.org/coordinates/sites.json
#https://datacenter.iers.org/data/9/finals2000A.all