Skip to content

Commit

Permalink
dependencies in Docker files and setup.py
Browse files Browse the repository at this point in the history
 Committer: Rico Sennrich <rico.sennrich@gmx.ch>
  • Loading branch information
Rico Sennrich committed Dec 17, 2017
1 parent f45efc7 commit 7c8851d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 18 deletions.
4 changes: 2 additions & 2 deletions Dockerfile.cpu
Expand Up @@ -8,14 +8,14 @@ RUN apt-get update && apt-get install -y \
python3 \
vim \
nano \
libopenblas-dev \
python-dev \
python-pip \
python-pygraphviz \
xml-twig-tools

RUN pip install --upgrade pip

RUN pip install numpy numexpr cython theano ipdb
RUN pip install tensorflow

RUN mkdir -p /path/to
WORKDIR /path/to/
Expand Down
8 changes: 2 additions & 6 deletions Dockerfile.gpu
@@ -1,4 +1,4 @@
FROM nvidia/cuda:7.5-cudnn5-devel
FROM nvidia/cuda:9.0-cudnn7-devel
MAINTAINER Tom Kocmi <kocmi@ufal.mff.cuni.cz>

# Install git, wget, python-dev, pip and other dependencies
Expand All @@ -20,14 +20,10 @@ RUN apt-get update && apt-get install -y \

RUN pip install --upgrade pip
RUN pip install -U setuptools
RUN pip install numexpr cython ipdb
RUN pip install tensorflow

# Set CUDA_ROOT
ENV CUDA_ROOT /usr/local/cuda/bin
# Install bleeding-edge Theano
RUN pip install --upgrade --no-deps theano
# Set up .theanorc for CUDA
RUN echo "[global]\ndevice=gpu\nfloatX=float32\noptimizer_including=cudnn\n[lib]\ncnmem=0.1\n[nvcc]\nfastmath=True" > /root/.theanorc


RUN mkdir -p /path/to
Expand Down
5 changes: 2 additions & 3 deletions setup.py
Expand Up @@ -5,15 +5,14 @@

setuptools.setup(
name='nematus',
version='0.1dev',
version='0.3dev',
description='Neural machine translation tools on top of Theano',
long_description=open(os.path.join(os.path.dirname(
os.path.abspath(__file__)), 'README.md')).read(),
license='BSD 3-clause',
url='http://github.com/rsennrich/nematus',
install_requires=['numpy',
'Theano',
'ipdb'],
'tensorflow'],
dependency_links=['git+http://github.com/Theano/Theano.git#egg=Theano',],
classifiers=['Development Status :: 3 - Alpha',
'Intended Audience :: Science/Research',
Expand Down
14 changes: 7 additions & 7 deletions test/README.md
@@ -1,21 +1,21 @@
Testing Nematus
---------------

To test translation, execute
To test translation (on GPU 0), execute

THEANO_FLAGS=mode=FAST_RUN,floatX=float32,device=cpu python test_translate.py
CUDA_VISIBLE_DEVICES=0 python test_translate.py

To test scoring, execute
To test scoring (on GPU 0), execute

THEANO_FLAGS=mode=FAST_RUN,floatX=float32,device=cpu python test_score.py
CUDA_VISIBLE_DEVICES=0 python test_score.py

more sample models (including scripts for pre- and postprocessing)
are provided at: http://statmt.org/rsennrich/wmt16_systems/

to test training, execute
to test training (on GPU 0), execute

THEANO_FLAGS=mode=FAST_RUN,floatX=float32,device=cpu ./test_train.sh
CUDA_VISIBLE_DEVICES=0 ./test_train.sh

note that the training script is just a toy setup to make sure the scripts run,
and to allow for speed comparisons. For instructions to train a
real-scale system, check the instructions at https://github.com/rsennrich/wmt16-scripts
real-scale system, check the instructions at https://github.com/rsennrich/wmt16-scripts

0 comments on commit 7c8851d

Please sign in to comment.