Dockerfile with the necessary libraries for natural language processing in python

For personal use, I created a Dockerfile to create an image with the libraries needed to perform natural language processing in python. Since I created it with much effort, I thought it would be useful for someone, so I decided to publish it here.

Source code

It is placed below. https://github.com/fukumame/dockerfile-machine-learning

Included libraries

--This docker image includes mecab, which is a morphological analysis engine, and the following python library.

How to use

--Do git clone from the above repository. git clone https://github.com/fukumame/dockerfile-machine-learning.git

--Go to the cloned directory and create a docker image from the following command.

cd /docker/file/path
#Creating an image file(IMAGE_NAME and TAG are arbitrary values)
docker build -t IMAGE_NAME:TAG .

--Start container based on the image created above. --At that time, specify the port for using Jupyter notebook on the host side with the p option, and specify the path of the host side directory with the v option.

#Any CONTAINER_Add NAME, HOST_Specify any port with PORT, and HOST_VOLUME_Specify the host side path in PATH and create a container
docker run -it --name CONTAINER_NAME -p HOST_PORT:8888 -v HOST_VOLUME_PATH:/notebook IMAGE_NAME bash

--When you start it, the following message will be displayed, so if you hit the URL from the browser according to the display, jupyter notebook will start. --The displayed 8888 port number is the port number on the container side, so if the port bound on the host side is different, replace it. --v The path on the host side specified as an option becomes the home directory of jupyter notebook.

    Copy/paste this URL into your browser when you connect for the first time,
    to login with a token:
        http://0.0.0.0:8888/?token=xxxxxxxxxx

image.png

Recommended Posts

Dockerfile with the necessary libraries for natural language processing in python
3. Natural language processing with Python 4-1. Analysis for words with KWIC
Building an environment for natural language processing with Python
3. Natural language processing with Python 2-1. Co-occurrence network
3. Natural language processing with Python 1-1. Word N-gram
Python: Natural language processing
3. Natural language processing with Python 2-2. Co-occurrence network [mecab-ipadic-NEologd]
[Python] I played with natural language processing ~ transformers ~
Python: Deep Learning in Natural Language Processing: Basics
100 Language Processing with Python Knock 2015
Quick batch text formatting + preprocessing for Aozora Bunko data for natural language processing with Python
3. Natural language processing with Python 5-1. Concept of sentiment analysis [AFINN-111]
3. Natural language processing with Python 5-2. Emotion intensity analysis tool VADER
Study natural language processing with Kikagaku
100 Language Processing Knock with Python (Chapter 1)
100 Language Processing Knock Chapter 1 in Python
Natural language processing for busy people
[Natural language processing] Preprocessing with Japanese
100 Language Processing Knock with Python (Chapter 3)
Natural language processing with Word2Vec developed by a researcher in the US google (original data)
Tips for dealing with binaries in Python
Display Python 3 in the browser with MAMP
100 Language Processing Knock with Python (Chapter 2, Part 2)
[WIP] Pre-processing memo in natural language processing
Process multiple lists with for in Python
100 Language Processing Knock with Python (Chapter 2, Part 1)
MongoDB for the first time in Python
Easy image processing in Python with Pillow
I tried natural language processing with transformers.
Receive a list of the results of parallel processing in Python with starmap
3. Natural language processing with Python 1-2. How to create a corpus: Aozora Bunko
Getting started with Python with 100 knocks on language processing
CERTIFICATE_VERIFY_FAILED in Python 3.6, the official installer for macOS
[Python] Get the files in a folder with Python
Load the network modeled with Rhinoceros in Python ③
[Python] Sort the list of pathlib.Path in natural sort
View the result of geometry processing in Python
[Automation] Extract the table in PDF with Python
Use logger with Python for the time being
Tips for hitting the ATND API in Python
Image processing? The story of starting Python for
Image Processing with Python Environment Setup for Windows
Load the network modeled with Rhinoceros in Python ②
Parallel processing with no deep meaning in Python
Let's enjoy natural language processing with COTOHA API
Load the network modeled with Rhinoceros in Python ①
[Introduction for beginners] Working with MySQL in Python
Unbearable shortness of Attention in natural language processing
Settings for getting started with MongoDB in python
[Python] [Natural language processing] I tried Deep Learning ❷ made from scratch in Japanese ①
3. Natural language processing with Python 3-1. Important word extraction tool TF-IDF analysis [original definition]
Python: Deep learning in natural language processing: Implementation of answer sentence selection system
Searching for an efficient way to write a Dockerfile in Python with poetry
Turn multiple lists with a for statement at the same time in Python
3. Natural language processing with Python 3-3. A year of corona looking back at TF-IDF
Set up a development environment for natural language processing
File processing in Python
Multithreaded processing in python
Specific sample code for working with SQLite3 in Python
Run with CentOS7 + Apache2.4 + Python3.6 for the time being
[Python] Measures and displays the time required for processing