LoginSignup
1
2

More than 3 years have passed since last update.

Dockerを使って数分でOpenCV&Python環境を構築して試す

Last updated at Posted at 2020-01-24

コード

下記のコマンドを指定して完了。
/mygit/appdir/は実行したいpythonファイルが有るフォルダを指定してください。

docker run -it --rm --name pythoncv -w /mygit/appdir/ -v "$PWD":/mygit/appdir/  jjanzic/docker-python3-opencv python index.py

各オプション

-w

作業フォルダ指定

-v

マウントディレクトリ指定

"is not shared from OS X and is not known to Docker."というエラーが出る場合があります。
こちらの記事を参照して回避してください。

【Docker For Mac】Error response from daemon: Mounts deniedの対応
https://qiita.com/nishina555/items/a75ce530d9382aa09511

感想

環境構築で時間が取られなくて最高。

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2