Skip to content

Instantly share code, notes, and snippets.

@musaprg
Last active July 4, 2019 01:24
Show Gist options
  • Save musaprg/1ebed21854b733c09274273e1728a17c to your computer and use it in GitHub Desktop.
Save musaprg/1ebed21854b733c09274273e1728a17c to your computer and use it in GitHub Desktop.

Prerequisites

  • Docker Engine
  • Docker Compose

How to use

download and move 2 files above to a project root (that contains your sources), and execute on it:

docker-compose build
docker-compose up

project structure

project_root/
    Dockerfile
    docker-compose.yml
    your_own_sources
version: '3'
services:
nb:
build: .
ports:
- 8888:8888
volumes:
- ".:/home/jovyan/work"
FROM jupyter/scipy-notebook
USER root
RUN apt-get update -y --fix-missing && \
apt-get -y install \
mecab \
libmecab-dev \
mecab-ipadic-utf8 \
git \
make \
curl \
xz-utils \
file
RUN git clone --depth 1 https://github.com/neologd/mecab-ipadic-neologd.git /tmp/neologd && \
cd /tmp/neologd && \
./bin/install-mecab-ipadic-neologd -n -u -y && \
rm -rf /tmp/neologd
RUN pip install -U \
'natto-py' \
'gensim==3.7.3'
USER $NB_UID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment