Sign inSign up

xingce/spider_bxc

By xingce

•Updated over 6 years ago

Image
0

1.7K

xingce/spider_bxc repository overview

FROM nvidia/cuda:10.1-cudnn7-devel-ubuntu16.04

⁠Install some basic utilities

RUN apt-get update && apt-get install -y
curl
ca-certificates
sudo
git
bzip2
libx11-6
&& rm -rf /var/lib/apt/lists/*

⁠Create a working directory

RUN mkdir /app WORKDIR /app

⁠Create a non-root user and switch to it

RUN adduser --disabled-password --gecos '' --shell /bin/bash user
&& chown -R user:user /app RUN echo "user ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/90-user USER user

⁠All users can use /home/user as their home directory

ENV HOME=/home/user RUN chmod 777 /home/user

⁠Install Miniconda

RUN curl -so ~/miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-4.5.11-Linux-x86_64.sh⁠
&& chmod +x ~/miniconda.sh
&& ~/miniconda.sh -b -p ~/miniconda
&& rm ~/miniconda.sh ENV PATH=/home/user/miniconda/bin:$PATH ENV CONDA_AUTO_UPDATE_CONDA=false

⁠Create a Python 3.6 environment

RUN /home/user/miniconda/bin/conda create -y --name py36 python=3.6.9
&& /home/user/miniconda/bin/conda clean -ya ENV CONDA_DEFAULT_ENV=py36 ENV CONDA_PREFIX=/home/user/miniconda/envs/$CONDA_DEFAULT_ENV ENV PATH=$CONDA_PREFIX/bin:$PATH RUN /home/user/miniconda/bin/conda install conda-build=3.18.9=py36_3
&& /home/user/miniconda/bin/conda clean -ya

RUN pip install torch torchvision

⁠Install HDF5 Python bindings

RUN conda install -y h5py=2.8.0
&& conda clean -ya RUN pip install h5py-cache==1.0

⁠Install Torchnet, a high-level framework for PyTorch

RUN pip install torchnet==0.0.4

RUN pip install mysql-connector \ && sudo apt-get update
&& sudo apt-get install libmysqlclient-dev -y
&& sudo apt-get install gcc -y
&& sudo apt-get install build-essential -y
&& pip install mysqlclient

RUN pip install nltk
&& pip install numpy
&& pip install scipy
&& pip install tqdm
&& pip install spacy
&& pip install fuzzywuzzy
&& pip install unidecode
&& pip install transformers

RUN export CPATH=/usr/local/cuda/include:$CPATH
&& export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
&& export PATH=/usr/local/cuda/bin:$PATH

RUN pip install pattern

RUN pip install --verbose --no-cache-dir torch-scatter
&& pip install --verbose --no-cache-dir torch-sparse
&& pip install --verbose --no-cache-dir torch-cluster
&& pip install --verbose --no-cache-dir torch-spline-conv
&& pip install torch-geometric EXPOSE 5000

⁠Set the default command to python3

CMD ["python3"]

⁠Fix some bugs

RUN pip install torch_scatter==1.3.1 && pip install torch_sparse==0.4.0

RUN python -c "import nltk; nltk.download('stopwords');" && python -m spacy download en_core_web_sm

Tag summary

Content type

Image

Digest

Size

4.3 GB

Last updated

over 6 years ago

docker pull xingce/spider_bxc:v2