Skip to content

Instantly share code, notes, and snippets.

@jk
Last active Apr 22, 2020
Embed
What would you like to do?
glove
FROM nvidia/cuda:10.0-base-ubuntu18.04
# See http://bugs.python.org/issue19846
ENV LANG C.UTF-8
LABEL com.nvidia.volumes.needed="nvidia_driver"
RUN echo "deb http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 /" > /etc/apt/sources.list.d/nvidia-ml.list
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
libc6-dev \
cmake \
git \
curl \
vim \
ca-certificates \
python-qt4 \
libjpeg-dev \
zip \
unzip \
libpng-dev \
libpthread-stubs0-dev \
&& rm -rf /var/lib/apt/lists/*
ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64
ENV PYTHON_VERSION=3.7
RUN curl -o ~/miniconda.sh -OL https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
chmod +x ~/miniconda.sh && \
~/miniconda.sh -b -p /opt/conda && \
rm ~/miniconda.sh && \
/opt/conda/bin/conda install conda-build && \
/opt/conda/bin/conda update -n base -c defaults conda
ENV PATH=$PATH:/opt/conda/bin/
ENV USER wiki
# Create Enviroment
COPY environment.yaml /environment.yaml
RUN conda env create -f environment.yaml
RUN cd /tmp \
&& curl -o glove_python.zip -OL https://github.com/maciejkula/glove-python/archive/master.zip \
&& unzip glove_python.zip \
&& rm -f glove_python.zip \
&& cd glove-python-master \
&& /opt/conda/envs/wiki/bin/cythonize -X language_level=3 -f -i glove/corpus_cython.pyx \
&& /opt/conda/envs/wiki/bin/cythonize -X language_level=3 -f -i glove/glove_cython.pyx \
&& /opt/conda/envs/wiki/bin/cythonize -X language_level=3 -f -i glove/metrics/accuracy_cython.pyx \
&& /opt/conda/envs/wiki/bin/pip install . \
&& cd .. \
&& rm -rf glove-python-master
RUN chmod -R a+w /notebooks
WORKDIR /notebooks
COPY run.sh /run.sh
CMD ["/run.sh"]
name: wiki
channels:
- conda-forge
- pytorch
- fastai
dependencies:
- cuda100
- cython
- keras
- gensim
- fastprogress
- jupyter
- tensorflow==2.0.0
- pip
- pip:
- nvidia-ml-py3
- dataclasses
root@7ecddbb0a664:/# command -v python
/usr/bin/python
root@7ecddbb0a664:/# command -v python3
/opt/conda/bin/python3
root@7ecddbb0a664:/# python --version
Python 2.7.17
root@7ecddbb0a664:/# python3 --version
Python 3.7.6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment