# # Copyright (C) 2018 Xuetong Tech Co., Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # FROM registry-vpc.cn-hangzhou.aliyuncs.com/schbrain/python:3.7.0 MAINTAINER xt ENV PYTHONUNBUFFERED 1 ENV TZ Asia/Shanghai # to fix install.r mirt ENV LIBRARY_PATH /usr/lib/gcc/x86_64-linux-gnu/8 COPY sources.list /etc/apt/sources.list COPY requirements.txt ./ RUN apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 40976EAF437D05B5 \ && apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 3B4FE6ACC0B21F32 \ && apt-get update \ && apt-get install -y --no-install-recommends --allow-unauthenticated \ bzip2 gcc libmysqlclient-dev \ littler r-cran-littler r-cran-stringr \ r-base=3.5.1-* r-base-dev=3.5.1-* r-recommended=3.5.1-* \ && pip install --no-cache-dir --trusted-host mirrors.aliyun.com \ -i http://mirrors.aliyun.com/pypi/simple -r requirements.txt \ && echo 'options(repos = c(CRAN = "https://cloud.r-project.org/"))' >> /etc/R/Rprofile.site \ && echo 'source("/etc/R/Rprofile.site")' >> /etc/littler.r \ && ln -s /usr/lib/R/site-library/littler/examples/install.r /usr/local/bin/install.r \ && ln -s /usr/lib/R/site-library/littler/examples/install2.r /usr/local/bin/install2.r \ && ln -s /usr/lib/R/site-library/littler/examples/installGithub.r /usr/local/bin/installGithub.r \ && ln -s /usr/lib/R/site-library/littler/examples/testInstalled.r /usr/local/bin/testInstalled.r \ && install.r docopt \ && install.r mirt \ && install.r mirtCAT \ && rm -rf /tmp/downloaded_packages/ /tmp/*.rds \ && rm -rf /var/lib/apt/lists/* CMD [ "/bin/bash" ]