GithubHelp home page GithubHelp logo

chusiang / ansible-jupyter.dockerfile Goto Github PK

View Code? Open in Web Editor NEW
25.0 4.0 8.0 192 KB

Building the Docker image with Ansible and Jupyter.

Home Page: https://hub.docker.com/r/chusiang/ansible-jupyter/

License: MIT License

Jupyter Notebook 90.25% Shell 1.93% Makefile 0.23% Python 3.44% Dockerfile 4.14%
ansible jupyter-notebook docker dockerfile jupyter dockerhub-image dockerhub

ansible-jupyter.dockerfile's People

Contributors

chusiang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ansible-jupyter.dockerfile's Issues

Add the 'syntax check' step

I want add the syntax check step, because some user didn't known where has fail.

  • alpine
  • archlinux
  • centos
  • debian
  • opensuse
  • ubuntu

Add `--allow-root` args for jupyter-notebook run

I can't run the jupyter-notebook at jupyter v4.3.0, maybe I need add the --allow-root args in the docker-entrypoint.sh.

$ docker run -p 8888:8888 -d chusiang/ansible-jupyter
[I 05:03:37.061 NotebookApp] Writing notebook server cookie secret to /root/.local/share/jupyter/runtime/notebook_cookie_secret
[W 05:03:37.077 NotebookApp] All authentication is disabled.  Anyone who can connect to this server will be able to run code.
[C 05:03:37.083 NotebookApp] Running as root is not recommended. Use --allow-root to bypass.

怎麼在 jupyter 上避開 `-K` 的問題?

目前 chusiang/ansible-managed-node 的 docker image 在使用 sudo 時,是需要輸入密碼的,這會在 jupyter 上操作到 become module 時造成 tasks 卡住的問題。

感謝友人 @maxsolar,要不是因為遇到實戰中的問題,應該不會那麼早發現這個 bug。:P

Add the automate testing with Travis CI

找個時間整合 Travis CI,並幫這個小小專案加個簡單的煙霧 (冒煙) 測試吧!

下次再遇到 docker build 成功,但 docker run 失敗時,應該要呈現 build fail 才行!

Add the 'TOC'

I want to add the TOC (Table of contexts) into some ipynb.

Source code

Table of contexts:

1. [Operating-System](#Operating-System)
1. [Ad-Hoc-commands](#Ad-Hoc-commands)
1. [Playbooks](#Playbooks)

Result

Table of contexts:

  1. Operating-System
  2. Ad-Hoc-commands
  3. Playbooks

Fixed deprecation errors thrown with Ansible 2.7

As the chusiang/ansible-jupyter docker images maintainer, I want to use list not loop to install multiple packages, so than we can fix this warning on Ansible v2.7.

$ ansible-playbook setup_jupyter.yml
...

TASK [Install apk packages on Alpine Linux] ************************************
[DEPRECATION WARNING]: Invoking "apk" only once while using a loop via 
squash_actions is deprecated. Instead of using a loop to supply multiple items 
and specifying `name: {{ item }}`, please use `name: u'{{ apk_packages }}'` and
 remove the loop. This feature will be removed in version 2.11. Deprecation 
warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
ok: [localhost] => (item=[u'openssh-client', u'vim'])

TASK [Install apt packages on Debian and Ubuntu] *******************************
[DEPRECATION WARNING]: Invoking "apt" only once while using a loop via 
squash_actions is deprecated. Instead of using a loop to supply multiple items 
and specifying `name: {{ item }}`, please use `name: u'{{ apt_packages }}'` and
 remove the loop. This feature will be removed in version 2.11. Deprecation 
warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
skipping: [localhost] => (item=[]) 

TASK [Install pacman packages on Arch Linux] ***********************************
[DEPRECATION WARNING]: Invoking "pacman" only once while using a loop via 
squash_actions is deprecated. Instead of using a loop to supply multiple items 
and specifying `name: {{ item }}`, please use `name: u'{{ pacman_packages }}'` 
and remove the loop. This feature will be removed in version 2.11. Deprecation 
warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
skipping: [localhost] => (item=[]) 

...

TASK [Install yum packages on CentOS] ******************************************
[DEPRECATION WARNING]: Invoking "yum" only once while using a loop via 
squash_actions is deprecated. Instead of using a loop to supply multiple items 
and specifying `name: {{ item }}`, please use `name: u'{{ yum_packages }}'` and
 remove the loop. This feature will be removed in version 2.11. Deprecation 
warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
skipping: [localhost] => (item=[]) 

TASK [Install zypper packages on openSUSE] *************************************
[DEPRECATION WARNING]: Invoking "zypper" only once while using a loop via 
squash_actions is deprecated. Instead of using a loop to supply multiple items 
and specifying `name: {{ item }}`, please use `name: u'{{ zypper_packages }}'` 
and remove the loop. This feature will be removed in version 2.11. Deprecation 
warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
skipping: [localhost] => (item=[]) 

TASK [Install general pip packages] ********************************************
[DEPRECATION WARNING]: Invoking "pip" only once while using a loop via 
squash_actions is deprecated. Instead of using a loop to supply multiple items 
and specifying `name: {{ item }}`, please use `name: u'{{ pip_packages }}'` and
 remove the loop. This feature will be removed in version 2.11. Deprecation 
warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
ok: [localhost] => (item=[u'docker-py', u'docker-compose'])

Reference:

[gentoo] fix pip install fail as root

The gentoo don't allow use the root to run the pip install command.

Running pip as root is not advised. It can render important system tools like emerge useless.[1]

pip - Gentoo Wiki

Error message from Docker Hub.

https://hub.docker.com/r/chusiang/ansible-jupyter/builds/b6fgkggbrgrybkz5dfesgzs/

...
Step 6/15 : RUN pip install -U pip

 ---> Running in e803e1f60837

�[91mERROR: (Gentoo) Please run pip with the --user option to avoid breaking python-exec
�[0m
Removing intermediate container e803e1f60837

The command '/bin/sh -c pip install -U pip' returned a non-zero code: 1

Fix the `ubuntu-14.04` image build fail

於 2017/02/28 06:58 收到 Docker Hub 的 build fail 通知。

  • OS: Ubuntu 14.04

  • Build Code: bbmjuyb8hbgqlhcxfg3et2x, bjgkvpwtgagv9ffqrxdpav9

  • Error log:

    TASK [install the jupyter notebook] ********************************************
    task path: /home/setup_jupyter.yml:130
    Using module file /usr/lib/python2.7/dist-packages/ansible/modules/core/packaging/language/pip.py
    <localhost> ESTABLISH LOCAL CONNECTION FOR USER: root
    <localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo ~/.ansible/tmp/ansible-tmp-1488320769.37-160308117687180 `" && echo ansible-tmp-1488320769.37-160308117687180="` echo ~/.ansible/tmp/ansible-tmp-1488320769.37-160308117687180 `" ) && sleep 0'
    <localhost> PUT /tmp/tmpB3mg3V TO /root/.ansible/tmp/ansible-tmp-1488320769.37-160308117687180/pip.py
    <localhost> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1488320769.37-160308117687180/ /root/.ansible/tmp/ansible-tmp-1488320769.37-160308117687180/pip.py && sleep 0'
    <localhost> EXEC /bin/sh -c '/usr/bin/python /root/.ansible/tmp/ansible-tmp-1488320769.37-160308117687180/pip.py; rm -rf "/root/.ansible/tmp/ansible-tmp-1488320769.37-160308117687180/" > /dev/null 2>&1 && sleep 0'
    fatal: [localhost]: FAILED! => {
        "changed": false, 
        "cmd": "/usr/local/bin/pip2 install jupyter==1.0.0", 
        "failed": true, 
        "invocation": {
            "module_args": {
                "chdir": null, 
                "editable": true, 
                "executable": null, 
                "extra_args": null, 
                "name": [
                    "jupyter"
                ], 
                "requirements": null, 
                "state": "present", 
                "umask": null, 
                "use_mirrors": true, 
                "version": "1.0.0", 
                "virtualenv": null, 
                "virtualenv_command": "virtualenv", 
                "virtualenv_python": null, 
                "virtualenv_site_packages": false
            }, 
            "module_name": "pip"
        }, 
        "msg": "stdout: Collecting jupyter==1.0.0\n  Downloading jupyter-1.0.0-py2.py3-none-any.whl\nCollecting nbconvert (from jupyter==1.0.0)\n  Downloading nbconvert-5.1.1-py2.py3-none-any.whl (372kB)\nCollecting ipykernel (from jupyter==1.0.0)\n  Downloading ipykernel-4.5.2-py2.py3-none-any.whl (98kB)\nCollecting jupyter-console (from jupyter==1.0.0)\n  Downloading jupyter_console-5.1.0-py2.py3-none-any.whl\nCollecting qtconsole (from jupyter==1.0.0)\n  Downloading qtconsole-4.2.1-py2.py3-none-any.whl (104kB)\nCollecting notebook (from jupyter==1.0.0)\n  Downloading notebook-4.4.1-py2.py3-none-any.whl (6.9MB)\nCollecting ipywidgets (from jupyter==1.0.0)\n  Downloading ipywidgets-6.0.0-py2.py3-none-any.whl (46kB)\nCollecting testpath (from nbconvert->jupyter==1.0.0)\n  Downloading testpath-0.3-py2.py3-none-any.whl (82kB)\nCollecting nbformat (from nbconvert->jupyter==1.0.0)\n  Downloading nbformat-4.3.0-py2.py3-none-any.whl (154kB)\nRequirement already satisfied: jinja2 in /usr/lib/python2.7/dist-packages (from nbconvert->jupyter==1.0.0)\nCollecting entrypoints>=0.2.2 (from nbconvert->jupyter==1.0.0)\n  Downloading entrypoints-0.2.2-py2.py3-none-any.whl\nCollecting pandocfilters>=1.4.1 (from nbconvert->jupyter==1.0.0)\n  Downloading pandocfilters-1.4.1.tar.gz\nCollecting jupyter-core (from nbconvert->jupyter==1.0.0)\n  Downloading jupyter_core-4.3.0-py2.py3-none-any.whl (76kB)\nCollecting traitlets>=4.2 (from nbconvert->jupyter==1.0.0)\n  Downloading traitlets-4.3.2-py2.py3-none-any.whl (74kB)\nCollecting bleach (from nbconvert->jupyter==1.0.0)\n  Downloading bleach-1.5.0-py2.py3-none-any.whl\nCollecting pygments (from nbconvert->jupyter==1.0.0)\n  Downloading Pygments-2.2.0-py2.py3-none-any.whl (841kB)\nCollecting mistune!=0.6 (from nbconvert->jupyter==1.0.0)\n  Downloading mistune-0.7.3-py2.py3-none-any.whl\nCollecting ipython>=4.0.0 (from ipykernel->jupyter==1.0.0)\n  Downloading ipython-5.3.0-py2-none-any.whl (750kB)\nCollecting tornado>=4.0 (from ipykernel->jupyter==1.0.0)\n  Downloading tornado-4.4.2.tar.gz (460kB)\nCollecting jupyter-client (from ipykernel->jupyter==1.0.0)\n  Downloading jupyter_client-5.0.0-py2.py3-none-any.whl (83kB)\nCollecting prompt-toolkit<2.0.0,>=1.0.0 (from jupyter-console->jupyter==1.0.0)\n  Downloading prompt_toolkit-1.0.13-py2-none-any.whl (247kB)\nCollecting terminado>=0.3.3; sys_platform != \"win32\" (from notebook->jupyter==1.0.0)\n  Downloading terminado-0.6.tar.gz\nCollecting ipython-genutils (from notebook->jupyter==1.0.0)\n  Downloading ipython_genutils-0.1.0-py2.py3-none-any.whl\nCollecting widgetsnbextension~=2.0.0 (from ipywidgets->jupyter==1.0.0)\n  Downloading widgetsnbextension-2.0.0-py2.py3-none-any.whl (1.1MB)\nRequirement already satisfied: jsonschema!=2.5.0,>=2.4 in /usr/local/lib/python2.7/dist-packages (from nbformat->nbconvert->jupyter==1.0.0)\nRequirement already satisfied: markupsafe in /usr/lib/python2.7/dist-packages (from jinja2->nbconvert->jupyter==1.0.0)\nCollecting configparser>=3.5; python_version == \"2.7\" (from entrypoints>=0.2.2->nbconvert->jupyter==1.0.0)\n  Downloading configparser-3.5.0.tar.gz\nRequirement already satisfied: enum34; python_version == \"2.7\" in /usr/local/lib/python2.7/dist-packages (from traitlets>=4.2->nbconvert->jupyter==1.0.0)\nRequirement already satisfied: six in /usr/lib/python2.7/dist-packages (from traitlets>=4.2->nbconvert->jupyter==1.0.0)\nCollecting decorator (from traitlets>=4.2->nbconvert->jupyter==1.0.0)\n  Downloading decorator-4.0.11-py2.py3-none-any.whl\nRequirement already satisfied: html5lib!=0.9999,!=0.99999,<0.99999999,>=0.999 in /usr/lib/python2.7/dist-packages (from bleach->nbconvert->jupyter==1.0.0)\nCollecting backports.shutil-get-terminal-size; python_version == \"2.7\" (from ipython>=4.0.0->ipykernel->jupyter==1.0.0)\n  Downloading backports.shutil_get_terminal_size-1.0.0-py2.py3-none-any.whl\nCollecting setuptools>=18.5 (from ipython>=4.0.0->ipykernel->jupyter==1.0.0)\n  Downloading setuptools-34.3.0-py2.py3-none-any.whl (389kB)\nCollecting pickleshare (from ipython>=4.0.0->ipykernel->jupyter==1.0.0)\n  Downloading pickleshare-0.7.4-py2.py3-none-any.whl\nCollecting simplegeneric>0.8 (from ipython>=4.0.0->ipykernel->jupyter==1.0.0)\n  Downloading simplegeneric-0.8.1.zip\nCollecting pexpect; sys_platform != \"win32\" (from ipython>=4.0.0->ipykernel->jupyter==1.0.0)\n  Downloading pexpect-4.2.1-py2.py3-none-any.whl (55kB)\nCollecting pathlib2; python_version == \"2.7\" or python_version == \"3.3\" (from ipython>=4.0.0->ipykernel->jupyter==1.0.0)\n  Downloading pathlib2-2.2.1-py2.py3-none-any.whl\nRequirement already satisfied: backports.ssl_match_hostname in /usr/local/lib/python2.7/dist-packages (from tornado>=4.0->ipykernel->jupyter==1.0.0)\nCollecting singledispatch (from tornado>=4.0->ipykernel->jupyter==1.0.0)\n  Downloading singledispatch-3.4.0.3-py2.py3-none-any.whl\nCollecting certifi (from tornado>=4.0->ipykernel->jupyter==1.0.0)\n  Downloading certifi-2017.1.23-py2.py3-none-any.whl (382kB)\nCollecting backports_abc>=0.4 (from tornado>=4.0->ipykernel->jupyter==1.0.0)\n  Downloading backports_abc-0.5-py2.py3-none-any.whl\nCollecting python-dateutil>=2.1 (from jupyter-client->ipykernel->jupyter==1.0.0)\n  Downloading python_dateutil-2.6.0-py2.py3-none-any.whl (194kB)\nCollecting pyzmq>=13 (from jupyter-client->ipykernel->jupyter==1.0.0)\n  Downloading pyzmq-16.0.2-cp27-cp27mu-manylinux1_x86_64.whl (3.0MB)\nCollecting wcwidth (from prompt-toolkit<2.0.0,>=1.0.0->jupyter-console->jupyter==1.0.0)\n  Downloading wcwidth-0.1.7-py2.py3-none-any.whl\nCollecting ptyprocess (from terminado>=0.3.3; sys_platform != \"win32\"->notebook->jupyter==1.0.0)\n  Downloading ptyprocess-0.5.1-py2.py3-none-any.whl\nRequirement already satisfied: functools32; python_version == \"2.7\" in /usr/local/lib/python2.7/dist-packages (from jsonschema!=2.5.0,>=2.4->nbformat->nbconvert->jupyter==1.0.0)\nCollecting appdirs>=1.4.0 (from setuptools>=18.5->ipython>=4.0.0->ipykernel->jupyter==1.0.0)\n  Downloading appdirs-1.4.2-py2.py3-none-any.whl\nCollecting packaging>=16.8 (from setuptools>=18.5->ipython>=4.0.0->ipykernel->jupyter==1.0.0)\n  Downloading packaging-16.8-py2.py3-none-any.whl\nCollecting scandir; python_version < \"3.5\" (from pathlib2; python_version == \"2.7\" or python_version == \"3.3\"->ipython>=4.0.0->ipykernel->jupyter==1.0.0)\n  Downloading scandir-1.5.tar.gz\nCollecting pyparsing (from packaging>=16.8->setuptools>=18.5->ipython>=4.0.0->ipykernel->jupyter==1.0.0)\n  Downloading pyparsing-2.1.10-py2.py3-none-any.whl (56kB)\nInstalling collected packages: testpath, decorator, ipython-genutils, traitlets, jupyter-core, nbformat, configparser, entrypoints, pandocfilters, bleach, pygments, mistune, nbconvert, backports.shutil-get-terminal-size, appdirs, pyparsing, packaging, setuptools, wcwidth, prompt-toolkit, scandir, pathlib2, pickleshare, simplegeneric, ptyprocess, pexpect, ipython, singledispatch, certifi, backports-abc, tornado, python-dateutil, pyzmq, jupyter-client, ipykernel, jupyter-console, qtconsole, terminado, notebook, widgetsnbextension, ipywidgets, jupyter\n  Running setup.py install for configparser: started\n    Running setup.py install for configparser: finished with status 'done'\n  Running setup.py install for pandocfilters: started\n    Running setup.py install for pandocfilters: finished with status 'done'\n  Found existing installation: setuptools 3.3\n    Uninstalling setuptools-3.3:\n      Successfully uninstalled setuptools-3.3\n  Running setup.py install for scandir: started\n    Running setup.py install for scandir: finished with status 'error'\n    Complete output from command /usr/bin/python -u -c \"import setuptools, tokenize;__file__='/tmp/pip-build-VMBiQW/scandir/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))\" install --record /tmp/pip-txYZqx-record/install-record.txt --single-version-externally-managed --compile:\n    Traceback (most recent call last):\n      File \"<string>\", line 1, in <module>\n      File \"/tmp/pip-build-VMBiQW/scandir/setup.py\", line 54, in <module>\n        'Programming Language :: Python :: Implementation :: CPython',\n      File \"/usr/lib/python2.7/distutils/core.py\", line 111, in setup\n        _setup_distribution = dist = klass(attrs)\n      File \"/usr/local/lib/python2.7/dist-packages/setuptools/dist.py\", line 320, in __init__\n        _Distribution.__init__(self, attrs)\n      File \"/usr/lib/python2.7/distutils/dist.py\", line 287, in __init__\n        self.finalize_options()\n      File \"/usr/local/lib/python2.7/dist-packages/setuptools/dist.py\", line 386, in finalize_options\n        ep.require(installer=self.fetch_build_egg)\n      File \"/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py\", line 2324, in require\n        items = working_set.resolve(reqs, env, installer, extras=self.extras)\n      File \"/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py\", line 859, in resolve\n        raise VersionConflict(dist, req).with_context(dependent_req)\n    pkg_resources.VersionConflict: (six 1.5.2 (/usr/lib/python2.7/dist-packages), Requirement.parse('six>=1.6.0'))\n    \n    ----------------------------------------\n\n:stderr: /usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.\n  SNIMissingWarning\n/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.\n  InsecurePlatformWarning\nCommand \"/usr/bin/python -u -c \"import setuptools, tokenize;__file__='/tmp/pip-build-VMBiQW/scandir/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))\" install --record /tmp/pip-txYZqx-record/install-record.txt --single-version-externally-managed --compile\" failed with error code 1 in /tmp/pip-build-VMBiQW/scandir/\n"
    }
    	to retry, use: --limit @/home/setup_jupyter.retry
    
    PLAY RECAP *********************************************************************
    localhost                  : ok=4    changed=3    unreachable=0    failed=1
    

Add `sshpass` package

If we want to use the password to control managed node (not ssh key), we need install the sshpass, too.

to use the 'ssh' connection type with passwords, you must install the sshpass program

`opensuse-42.1` image build fail

需升級 Ansible 至 2.0+

系統內建的 ansible 為 1.9,其支援的 playbook 語法有些老舊,官方文件上也沒有提供比較好的做法,將採直接從 source code 編譯 rpm 的方式進行新版 ansible 的安裝。

Fix ssl error on Alpine 3.4

I get the ssl error when install the Ansible 2.3.1 on Alpine linux 3.4.

https://hub.docker.com/r/chusiang/ansible-jupyter/builds/bcfwzvzefujyrau3h6mvhcf/

...
Step 6/14 : RUN pip install ansible

 ---> Running in 2b95aafd3a08

Collecting ansible

  Downloading ansible-2.3.1.0.tar.gz (4.3MB)

Collecting jinja2 (from ansible)

  Downloading Jinja2-2.9.6-py2.py3-none-any.whl (340kB)

Collecting PyYAML (from ansible)

  Downloading PyYAML-3.12.tar.gz (253kB)

Collecting paramiko (from ansible)

  Downloading paramiko-2.2.1-py2.py3-none-any.whl (176kB)

Collecting pycrypto>=2.6 (from ansible)

  Downloading pycrypto-2.6.1.tar.gz (446kB)

Requirement already satisfied: setuptools in /usr/lib/python2.7/site-packages (from ansible)

Collecting MarkupSafe>=0.23 (from jinja2->ansible)

  Downloading MarkupSafe-1.0.tar.gz

Collecting cryptography>=1.1 (from paramiko->ansible)

  Downloading cryptography-1.9.tar.gz (409kB)

Collecting bcrypt>=3.1.3 (from paramiko->ansible)

  Downloading bcrypt-3.1.3.tar.gz (40kB)

Collecting pyasn1>=0.1.7 (from paramiko->ansible)

  Downloading pyasn1-0.2.3-py2.py3-none-any.whl (53kB)

Collecting pynacl>=1.0.1 (from paramiko->ansible)

  Downloading PyNaCl-1.1.2.tar.gz (3.1MB)

    Complete output from command python setup.py egg_info:
    Download error on https://pypi.python.org/simple/cffi/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) -- Some packages may not be found!
    Couldn't find index page for 'cffi' (maybe misspelled?)
    Download error on https://pypi.python.org/simple/: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) -- Some packages may not be found!
    No local packages or download links found for cffi>=1.4.1
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-4LaWvQ/pynacl/setup.py", line 232, in <module>
        "Programming Language :: Python :: 3.6",
      File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
        _setup_distribution = dist = klass(attrs)
      File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 269, in __init__
        self.fetch_build_eggs(attrs['setup_requires'])
      File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 313, in fetch_build_eggs
        replace_conflicting=True,
      File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 826, in resolve
        dist = best[req.key] = env.best_match(req, ws, installer)
      File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1092, in best_match
        return self.obtain(req, installer)
      File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1104, in obtain
        return installer(requirement)
      File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 380, in fetch_build_egg
        return cmd.easy_install(req)
      File "/usr/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 634, in easy_install
        raise DistutilsError(msg)
    distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('cffi>=1.4.1')
    
    ----------------------------------------

�[91mCommand "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-4LaWvQ/pynacl/
�[0m
Removing intermediate container 2b95aafd3a08

The command '/bin/sh -c pip install ansible' returned a non-zero code: 1

Fix the `alpine-3.4` image build fail

於 2017/03/16 09:25 收到 Docker Hub 的 build fail 通知。

TASK [install same packages] ***************************************************
task path: /home/setup_jupyter.yml:61

Running apk

Using module file /usr/lib/python2.7/site-packages/ansible/modules/extras/packaging/os/apk.py

<localhost> ESTABLISH LOCAL CONNECTION FOR USER: root
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo ~/.ansible/tmp/ansible-tmp-1489627394.03-1406725730754 `" && echo ansible-tmp-1489627394.03-1406725730754="` echo ~/.ansible/tmp/ansible-tmp-1489627394.03-1406725730754 `" ) && sleep 0'

<localhost> PUT /tmp/tmpWJwzcA TO /root/.ansible/tmp/ansible-tmp-1489627394.03-1406725730754/apk.py

<localhost> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1489627394.03-1406725730754/ /root/.ansible/tmp/ansible-tmp-1489627394.03-1406725730754/apk.py && sleep 0'

<localhost> EXEC /bin/sh -c '/usr/bin/python /root/.ansible/tmp/ansible-tmp-1489627394.03-1406725730754/apk.py; rm -rf "/root/.ansible/tmp/ansible-tmp-1489627394.03-1406725730754/" > /dev/null 2>&1 && sleep 0'

failed: [localhost] (item=[u'bash', u'bash-completion', u'ca-certificates', u'curl', u'git', u'openssl']) => {
    "failed": true, 
    "invocation": {
        "module_args": {
            "name": [
                "bash", 
                "bash-completion", 
                "ca-certificates", 
                "curl", 
                "git", 
                "openssl"
            ], 
            "state": "present", 
            "update_cache": false, 
            "upgrade": false
        }
    }, 
    "item": [
        "bash", 
        "bash-completion", 
        "ca-certificates", 
        "curl", 
        "git", 
        "openssl"
    ], 
    "msg": "failed to install bash bash-completion ca-certificates curl git openssl"
}

	to retry, use: --limit @/home/setup_jupyter.retry

PLAY RECAP *********************************************************************
localhost                  : ok=1    changed=0    unreachable=0    failed=1 

`centos-6` image build fail

需升級 Python 至 2.7+

由於 CentOS 6 內建的 Python 2.6 已有些老舊,會導致無法正常用 pip 來安裝 jupyter。

$ pip install jupyter
DEPRECATION: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of pip will drop support for Python 2.6
...
entrypoints requires Python '>=2.7' but the running Python is 2.6.6

Reference

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.