|
| 1 | +# -*- coding: utf-8 -*- |
| 2 | +# |
| 3 | +# This file is part of INSPIRE. |
| 4 | +# Copyright (C) 2016-2018 CERN. |
| 5 | +# |
| 6 | +# INSPIRE is free software: you can redistribute it and/or modify |
| 7 | +# it under the terms of the GNU General Public License as published by |
| 8 | +# the Free Software Foundation, either version 3 of the License, or |
| 9 | +# (at your option) any later version. |
| 10 | +# |
| 11 | +# INSPIRE is distributed in the hope that it will be useful, |
| 12 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | +# GNU General Public License for more details. |
| 15 | +# |
| 16 | +# You should have received a copy of the GNU General Public License |
| 17 | +# along with INSPIRE. If not, see <http://www.gnu.org/licenses/>. |
| 18 | +# |
| 19 | +# In applying this licence, CERN does not waive the privileges and immunities |
| 20 | +# granted to it by virtue of its status as an Intergovernmental Organization |
| 21 | +# or submit itself to any jurisdiction. |
| 22 | + |
| 23 | +FROM pytorch/pytorch:0.4_cuda9_cudnn7 |
| 24 | + |
| 25 | +COPY instance-data /opt/conda/var/inspire_classifier.app-instance/ |
| 26 | +COPY boot.sh requirements.txt /app/ |
| 27 | +WORKDIR /app |
| 28 | +RUN apt-get update && apt-get -y install ffmpeg libglib2.0-0 libsm6 libxrender1 libxext6 build-essential git \ |
| 29 | + && python -m pip install pip --upgrade \ |
| 30 | + && pip install --upgrade --no-deps --force-reinstall https://download.pytorch.org/whl/cpu/torch-0.3.1-cp36-cp36m-linux_x86_64.whl \ |
| 31 | + && pip freeze \ |
| 32 | + && pip install --upgrade setuptools \ |
| 33 | + && pip install -r requirements.txt \ |
| 34 | + && pip freeze \ |
| 35 | + && apt-get -y remove build-essential git \ |
| 36 | + && apt-get -y autoremove && apt-get clean |
| 37 | +ENV LC_ALL=C.UTF-8 |
| 38 | +ENV LANG=C.UTF-8 |
| 39 | +ENTRYPOINT ["./boot.sh"] |
0 commit comments