2019-11-02 00:06:57 +00:00
|
|
|
# override this to "nvidia/cuda:10.1-runtime-ubi8" if cuda is desired
|
|
|
|
ARG BASE_IMAGE=registry.access.redhat.com/ubi8/ubi:latest
|
2019-08-30 16:54:03 +00:00
|
|
|
FROM ${BASE_IMAGE}
|
|
|
|
|
|
|
|
MAINTAINER Thingpedia Admins <thingpedia-admins@lists.stanford.edu>
|
|
|
|
|
2019-12-15 01:18:27 +00:00
|
|
|
USER root
|
|
|
|
|
|
|
|
# copy source
|
2020-01-29 02:04:25 +00:00
|
|
|
COPY . /opt/genienlp
|
2019-12-15 01:18:27 +00:00
|
|
|
|
|
|
|
# install basic tools and python3, install dependencies, and then cleanup
|
2020-03-27 22:55:33 +00:00
|
|
|
# HACK: we need to download the wheel manually or docker will die
|
2019-12-15 01:18:27 +00:00
|
|
|
RUN dnf -y install git gcc gcc-c++ \
|
2019-11-02 00:06:57 +00:00
|
|
|
python3 \
|
|
|
|
python3-numpy \
|
|
|
|
python3-scipy \
|
|
|
|
python3-pip \
|
|
|
|
python3-devel \
|
2020-03-27 22:55:33 +00:00
|
|
|
&& curl -sL https://files.pythonhosted.org/packages/24/19/4804aea17cd136f1705a5e98a00618cb8f6ccc375ad8bfa437408e09d058/torch-1.4.0-cp36-cp36m-manylinux1_x86_64.whl \
|
|
|
|
-o torch-1.4.0-cp36-cp36m-manylinux1_x86_64.whl \
|
|
|
|
&& pip3 install torch-1.4.0-cp36-cp36m-manylinux1_x86_64.whl \
|
|
|
|
&& rm -fr torch-1.4.0-cp36-cp36m-manylinux1_x86_64.whl \
|
2020-01-29 02:04:25 +00:00
|
|
|
&& pip3 install -e /opt/genienlp \
|
2019-12-15 01:18:27 +00:00
|
|
|
&& rm -fr /root/.cache \
|
|
|
|
&& dnf -y remove gcc gcc-c++ \
|
2019-11-02 00:06:57 +00:00
|
|
|
&& rm -fr /var/cache/dnf
|
2019-08-30 16:54:03 +00:00
|
|
|
|
2020-01-29 02:04:25 +00:00
|
|
|
# add user genienlp
|
|
|
|
RUN useradd -ms /bin/bash -r genienlp
|
|
|
|
USER genienlp
|
|
|
|
WORKDIR /home/genienlp
|
|
|
|
ENTRYPOINT ["genienlp"]
|