UKPLab / elmo-bilstm-cnn-crf

BiLSTM-CNN-CRF architecture for sequence tagging using ELMo representations.
Apache License 2.0
388 stars 81 forks source link

Dockerfile for GPU enabled computing #40

Open sathiyabalu89 opened 3 years ago

sathiyabalu89 commented 3 years ago

First of all, thank you for the wonderful repo. I am trying to set this up using docker and I found the dockerfile to be CPU based. Is it possible to give the dockerfile for GPU based computation. ? I tried changing the dockerfile as follows and ended up with various errors.

FROM nvidia/cuda:9.0-cudnn7-runtime-ubuntu16.04

ARG username=developer ARG userid=10101

COPY ./requirements.txt requirements.txt

RUN apt-get update && apt-get install -y --no-install-recommends \ apt-utils\ bzip2 \ wget \ python3.6\ python3-pip \ python3-setuptools

RUN useradd -u ${userid} -m -s /bin/bash -N ${username}

COPY jupyter_notebook_config.py / RUN chown ${username} jupyter_notebook_config.py

RUN mkdir /home/${username}/deep_learning RUN chmod -R 777 /home/${username} RUN chmod -R 777 /home/${username}/deep_learning USER ${username}

RUN pip3 install --upgrade pip

RUN pip3 install -r requirements.txt

Download NLTK tokenization model

RUN python -m nltk.downloader -d /usr/local/share/nltk_data punkt

EXPOSE 8888 6006

WORKDIR /home/${username}/deep_learning ENV PATH=/home/${username}/.local/bin

RUN echo export PATH=$PATHbin:'$PATH' > /etc/profile.d/conda.sh

RUN export PATH=$PATH:~/.local/bin

CMD jupyter lab --config=/jupyter_notebook_config.py --no-browser --port=8888 --ip=0.0.0.0