yeonsook kwak
yeonsook kwak

Reputation: 112

docker container jupyter lab, how to add other packages?

I'm using docker for deep learning. and i'm super beginner as docker user. ubuntu 18.04 docker version 19.03.6 and i got ufoym/deepo image. so i'm using jupyter lab in web. container 1 : jupyter lab container 2 : vscode

question 1. if i want to use other python packages(like matplotlib basemap toolkits, hdbscan,folium that doesn't contain in ufoym/deepo image) , how can i install and build those packages? 2. in jupyter lab, when i do (e.g) !pip install foium, then where is the installed directory ?? and is it the right way to use (pip install?) in docker system?

please help me~

Upvotes: 1

Views: 1808

Answers (1)

mrodo
mrodo

Reputation: 581

Yes, you absolutely can use pip inside the docker container. The official Python Docker image actually already comes with pip preinstalled.

The usual way pip is used in the container is by placing a requirements.txt in your project folder, the one that will then be mapped inside the container. In your Dockefile you should then add these lines to install the packages.

COPY requirements.txt <path to the folder your app will live inside the container>
RUN pip install -r requirements.txt

Upvotes: 1

Related Questions