質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.51%
JupyterLab

JupyterLabは、Jupyter notebookの後継の対話型開発環境(IDE)です。データの可視化がインタラクティブで、プラグイン作成により新しいコンポーネントの追加および既存のコンポーネントも統合可能。サーバに閉じているため、データ分析に向いています。

Python 3.x

Python 3はPythonプログラミング言語の最新バージョンであり、2008年12月3日にリリースされました。

Ubuntu

Ubuntuは、Debian GNU/Linuxを基盤としたフリーのオペレーティングシステムです。

Docker

Dockerは、Docker社が開発したオープンソースのコンテナー管理ソフトウェアの1つです

Q&A

解決済

1回答

2093閲覧

停止中のコンテナ起動エラー_container_linux.go:380:

evans00

総合スコア1

JupyterLab

JupyterLabは、Jupyter notebookの後継の対話型開発環境(IDE)です。データの可視化がインタラクティブで、プラグイン作成により新しいコンポーネントの追加および既存のコンポーネントも統合可能。サーバに閉じているため、データ分析に向いています。

Python 3.x

Python 3はPythonプログラミング言語の最新バージョンであり、2008年12月3日にリリースされました。

Ubuntu

Ubuntuは、Debian GNU/Linuxを基盤としたフリーのオペレーティングシステムです。

Docker

Dockerは、Docker社が開発したオープンソースのコンテナー管理ソフトウェアの1つです

0グッド

0クリップ

投稿2022/08/07 05:49

編集2022/08/09 00:35

前提

お世話になります。
以下事象で困っており対処方法、試すべき事、
ヒントをアドバイス戴けますと幸いです。

当方環境

Win11上でWSL2/Docker desktop for Win/Ubuntu_latest
Ubuntuベースイメージからカスタムしたコンテナ内に
Python-Anaconda開発環境作ってコーディング中

実現したいこと

Selenium利用したChromeの自動操作したいため、
コンテナ内にChromeLinux版+そのverに対応する
Chromeドライバーを導入したい。
その為に、Dockerfileを追記更新、
Imageから再Buildしコンテナ再作成したい。

発生している問題・エラーメッセージ

以下dockerfileとdockerコマンド実行し、
image作成できた。docker imagesでimage確認できた。
また、停止状態のコンテナの存在まで確認できた。

その後、docker-compose up -d やdocker start やdocker runなど起動を色々試したが
停止中のコンテナから起動ができないエラー

更新して実行したdockerfile

FROM ubuntu:latest WORKDIR /tmp ENV TZ=Asia/Tokyo RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone RUN apt-get update && apt-get install -y sudo wget vim curl gawk make gcc git portaudio19-dev unzip RUN wget https://repo.continuum.io/archive/Anaconda3-2022.05-Linux-x86_64.sh && \ bash Anaconda3-2022.05-Linux-x86_64.sh -b && \ rm -f Anaconda3-2022.05-Linux-x86_64.sh && \ sudo curl -sL https://deb.nodesource.com/setup_lts.x | sudo bash - && \ sudo apt-get install -y nodejs ENV PATH $PATH:/root/anaconda3/bin RUN pip install --upgrade pip RUN pip install pandas_datareader RUN pip install mplfinance RUN pip install japanize-matplotlib RUN pip install selenium RUN pip install webdriver_manager RUN pip install tweepy RUN pip install spotipy RUN pip install --upgrade google-cloud-speech RUN pip install pydub RUN pip install --global-option='build_ext' --global-option='-I/usr/local/include' --global-option='-L/usr/local/lib' pyaudio RUN pip install Scrapy RUN wget --quiet http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz -O ta-lib-0.4.0-src.tar.gz && \ tar xvf ta-lib-0.4.0-src.tar.gz && \ cd ta-lib/ && \ ./configure --prefix=/usr && \ make && \ sudo make install && \ cd .. && \ pip install TA-Lib && \ rm -R ta-lib ta-lib-0.4.0-src.tar.gz RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add && \ wget http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_103.0.5060.134-1_amd64.deb && \ apt-get install -y -f ./google-chrome-stable_103.0.5060.134-1_amd64.deb ADD https://chromedriver.storage.googleapis.com/103.0.5060.134/chromedriver_linux64.zip /opt/chrome/ RUN cd /opt/chrome/ && \ unzip chromedriver_linux64.zip ENV PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/chrome RUN mkdir /workspace CMD ["jupyter-lab", "--notebook-dir=/workspace","--ip=0.0.0.0","--port=8888" ,"--no-browser", "--allow-root", "--LabApp.token=''"] WORKDIR /

実行したDockerコマンド

docker build . --no-cache docker ps -a

その後、docker-compose up -d やdocker start やdocker runなど起動を色々試した

実行結果のエラー

ERROR: for docker-python Cannot start service jupyterlab: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "jupyter-lab": executable file not found in $PATH: unknown ERROR: for jupyterlab Cannot start service jupyterlab: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "jupyter-lab": executable file not found in $PATH: unknown ERROR: Encountered errors while bringing up the project.

試したこと

jupyter-labの実行ファイルがないとのメッセージで
今回追記した部分を削除し元のdockerfileに戻して
imageから再Buildすると普通にコンテナ作成されjupyterlabも起動し使える。
jupyterlabの実行ファイル自体が存在しない訳ではなく、
PATHが変わっておかしくなっているのでは??という想像

元のdockerfileに対して追記した差分は以下のみ

RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add && \ wget http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_103.0.5060.134-1_amd64.deb && \ apt-get install -y -f ./google-chrome-stable_103.0.5060.134-1_amd64.deb ADD https://chromedriver.storage.googleapis.com/103.0.5060.134/chromedriver_linux64.zip /opt/chrome/ RUN cd /opt/chrome/ && \ unzip chromedriver_linux64.zip ENV PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/chrome

これまで調査した事

以下サイトなどでエラーコードから原因調査しているが初学者で
どうしても対処策が掴めない状況

https://qol-kk.com/wp2/blog/2021/07/06/post-2951/
https://qiita.com/miyabi-san/items/dab69ebbbd3fb4d98875
https://genchan.net/it/virtualization/docker/3013/
https://github.com/docker/for-linux/issues/1371
https://demura.net/misc/22079.html
https://forums.docker.com/t/error-response-from-daemon-oci-runtime-create-failed-container-linux-go-starting-container-process-caused-exec-python/115382
https://suzuyosy.com/index.php/2022/06/22/post-1006/
https://cpoint-lab.co.jp/article/202203/22324/

https://forums.docker.com/t/error-response-from-daemon-oci-runtime-create-failed-container-linux-go-starting-container-process-caused-exec-python/115382
https://stackoverflow.com/questions/71966074/executble-file-not-found-in-path-unknown
https://stackoverflow.com/questions/27158840/docker-executable-file-not-found-in-path
https://developer.aliyun.com/article/912988
https://teratail.com/questions/e5eui7nqvayr1h

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

dockerのことはよく分かりませんが,変更前のPATHは,
ENV PATH $PATH:/root/anaconda3/bin
なので,/root/anaconda3/binは死守すべきだと思います。
なお,上記の書き方は,PATH/root/anaconda3/binを追加するという書き方なので,

追加部分のENV PATH ...も同様に

dockerfile

1ENV PATH $PATH:/opt/chrome

とするぐらいで改善するのではないでしょうか。

投稿2022/08/07 11:07

ujimushi_sradjp

総合スコア2066

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

evans00

2022/08/08 15:35

アドバイス戴きありがとうございます。 一旦image/コンテナ削除し、 ご指摘の形にPATHの指定を書き直し、 imageから再Buildしましたところ、 期待通りにimageからコンテナ再作成、起動もでき 正常にjupyterlabも起動する事ができました。 この度、高いスキルで的確なご指導戴き感謝致します。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.51%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問