Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running in WSL on Windows 10 #3

Open
theforgottenmachine opened this issue Nov 26, 2018 · 3 comments
Open

Running in WSL on Windows 10 #3

theforgottenmachine opened this issue Nov 26, 2018 · 3 comments

Comments

@theforgottenmachine
Copy link

Hi,

I'm trying to get this up and running using the Windows Subsystem for Linux. Three of the containers keep restarting. After debugging a little bit I found the following during the docker-compose build up step

postgres_1_44290de0f346 | 2018-11-26 23:03:17.667 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
postgres_1_44290de0f346 | 2018-11-26 23:03:17.667 UTC [1] LOG:  listening on IPv6 address "::", port 5432
apistar_1_6e8d837f2137 | [2018-11-26 23:03:17 +0000] [1] [INFO] Starting gunicorn 19.8.1
apistar_1_6e8d837f2137 | [2018-11-26 23:03:17 +0000] [1] [INFO] Listening at: http://0.0.0.0:8000 (1)
apistar_1_6e8d837f2137 | [2018-11-26 23:03:17 +0000] [1] [INFO] Using worker: sync
apistar_1_6e8d837f2137 | [2018-11-26 23:03:17 +0000] [7] [INFO] Booting worker with pid: 7
apistar_1_6e8d837f2137 | [2018-11-26 23:03:17 +0000] [7] [ERROR] Exception in worker process
apistar_1_6e8d837f2137 | Traceback (most recent call last):
apistar_1_6e8d837f2137 |   File "/usr/local/lib/python3.6/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
apistar_1_6e8d837f2137 |     worker.init_process()
apistar_1_6e8d837f2137 |   File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/base.py", line 129, in init_process
apistar_1_6e8d837f2137 |     self.load_wsgi()
apistar_1_6e8d837f2137 |   File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
apistar_1_6e8d837f2137 |     self.wsgi = self.app.wsgi()
apistar_1_6e8d837f2137 |   File "/usr/local/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
apistar_1_6e8d837f2137 |     self.callable = self.load()
apistar_1_6e8d837f2137 |   File "/usr/local/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
apistar_1_6e8d837f2137 |     return self.load_wsgiapp()
apistar_1_6e8d837f2137 |   File "/usr/local/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
apistar_1_6e8d837f2137 |     return util.import_app(self.app_uri)
apistar_1_6e8d837f2137 |   File "/usr/local/lib/python3.6/site-packages/gunicorn/util.py", line 350, in import_app
apistar_1_6e8d837f2137 |     __import__(module)
apistar_1_6e8d837f2137 | ModuleNotFoundError: No module named 'app'

Another thing that might be relevant was this (when I ran docker-compose build apistar):

Step 3/4 : RUN pip install --proxy=${http_proxy}    psycopg2-binary    minio
 ---> Running in e8e60c7b69e4
The directory '/home/jovyan/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/jovyan/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.

Any ideas?

@jgoerner
Copy link
Owner

Hey @theforgottenmachine ,

Thanks for the reply. Can you please confirm that you are using the last version of this repository?

The thing that makes me wonder is the second output. The logfile indicates, that the Apistar Dockerfile is build in 4 steps - but it should be 8 steps as declared in the Apistar Dockerfile

@theforgottenmachine
Copy link
Author

theforgottenmachine commented Nov 28, 2018

@jgoerner - Thank you for the reply! This only happens after I've run it once. The first time I get all eight steps:

docker-compose build apistar

Building apistar Step 1/8 : FROM python:3.6-alpine 3.6-alpine: Pulling from library/python 4fe2ade4980c: Pull complete 7cf6a1d62200: Pull complete bd5bf1aa7305: Pull complete 73e1cfb346e5: Pull complete 1e70e0bfa6e9: Pull complete Digest: sha256:efdc898dcd3934564489a933f13a51f136960e63d779ca88750cfe07add65c22 Status: Downloaded newer image for python:3.6-alpine ---> 1d981af1e3b4

Step 2/8 : MAINTAINER Joshua Goerner <[email protected]> ---> Running in 5e557fefb611 Removing intermediate container 5e557fefb611 ---> 279f061eb5b1

Step 3/8 : WORKDIR /usr/src/app ---> Running in c62b9c774c4c Removing intermediate container c62b9c774c4c ---> fd759973acb7

Step 4/8 : RUN apk add --update postgresql-dev build-base openblas-dev gfortran && rm -rf /var/cache/apk/* ---> Running in 472d33a44749 fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/main/x86_64/APKINDEX.tar.gz fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/community/x86_64/APKINDEX.tar.gz (1/32) Installing binutils (2.30-r5) (2/32) Installing libmagic (5.32-r0) (3/32) Installing file (5.32-r0) (4/32) Installing gmp (6.1.2-r1) (5/32) Installing isl (0.18-r0) (6/32) Installing libgomp (6.4.0-r9) (7/32) Installing libatomic (6.4.0-r9) (8/32) Installing pkgconf (1.5.3-r0) (9/32) Installing libgcc (6.4.0-r9) (10/32) Installing mpfr3 (3.1.5-r1)

Everything looks good till it gets here:

Downloading https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl Installing collected packages: click, MarkupSafe, jinja2, certifi, idna, chardet, urllib3, requests, pyyaml, werkzeug, whitenoise, apistar, gunicorn, dill, six, python-dateutil, pytz, minio, psycopg2-binary, scipy, scikit-learn Running setup.py install for MarkupSafe: started Running setup.py install for MarkupSafe: finished with status 'done' Running setup.py install for pyyaml: started Running setup.py install for pyyaml: finished with status 'done' Running setup.py install for apistar: started Running setup.py install for apistar: finished with status 'done' Running setup.py install for dill: started Running setup.py install for dill: finished with status 'done' Running setup.py install for psycopg2-binary: started Running setup.py install for psycopg2-binary: finished with status 'done' Running setup.py install for scipy: started Running setup.py install for scikit-learn: started Running setup.py install for scikit-learn: still running... Running setup.py install for scikit-learn: still running... Running setup.py install for scikit-learn: finished with status 'done' Successfully installed MarkupSafe-1.1.0 apistar-0.5.41 certifi-2018.10.15 chardet-3.0.4 click-7.0 dill-0.2.7.1 gunicorn-19.8.1 idna-2.7 jinja2-2.10 minio-4.0.0 psycopg2-binary-2.7.4 python-dateutil-2.7.5 pytz-2018.7 pyyaml-3.13 requests-2.20.1 scikit-learn-0.20.1 scipy-1.1.0 six-1.11.0 urllib3-1.24.1 werkzeug-0.14.1 whitenoise-4.1.2 Removing intermediate container 58ef6197cfc6 ---> 8209ef0d4c59

Step 7/8 : RUN pip install --no-cache-dir --no-deps --proxy=${http_proxy} pandas ---> Running in 185443425eca Collecting pandas Downloading https://files.pythonhosted.org/packages/e9/ad/5e92ba493eff96055a23b0a1323a9a803af71ec859ae3243ced86fcbd0a4/pandas-0.23.4.tar.gz (10.5MB) Installing collected packages: pandas Running setup.py install for pandas: started Running setup.py install for pandas: still running... Running setup.py install for pandas: still running... Running setup.py install for pandas: still running... Running setup.py install for pandas: still running... Running setup.py install for pandas: still running... Running setup.py install for pandas: finished with status 'done' Successfully installed pandas-0.23.4 Removing intermediate container 185443425eca ---> 01d5ff81e5da

Step 8/8 : EXPOSE 8000 ---> Running in fbfdd763c470 Removing intermediate container fbfdd763c470 ---> 989ce281ead6 Successfully built 989ce281ead6 Successfully tagged awesome-project_apistar:latest

Here's the result of docker-compose up (I didn't use -d so I could see the output):

Digest: sha256:24eff1eeafdc22f744e003771d1f40b97997b4593763a8ca2d4967b314f2879d Status: Downloaded newer image for jupyter/scipy-notebook:latest ---> 11ed466a40e6

Step 2/4 : USER root ---> Running in 937cc6e1cad5 Removing intermediate container 937cc6e1cad5 ---> 2e97159d992e

Step 3/4 : RUN pip install --proxy=${http_proxy} psycopg2-binary minio ---> Running in 808de78d131b

The directory '/home/jovyan/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/jovyan/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.

Collecting psycopg2-binary Downloading https://files.pythonhosted.org/packages/cd/eb/4e872a11edd82079b4163035389051668c58cd2acc30777b6bee73f5f8a3/psycopg2_binary-2.7.6.1-cp36-cp36m-manylinux1_x86_64.whl (2.7MB) Collecting minio Downloading https://files.pythonhosted.org/packages/e1/8e/4ee133981025b43737af5afbf76adcd683efd81a7775373932cf71486060/minio-4.0.6-py2.py3-none-any.whl (52kB)

Creating Awesome-project_postgres ... done Creating Awesome-project_jupyter ... done Creating Awesome-project_minio ... done Creating Awesome-project_apistar ... done Creating Awesome-project_portainer ... done Creating Awesome-project_superset ... done Creating Awesome-project_airflow ... done

Awesome-project_postgres | 2018-11-28 03:30:49.850 UTC [1] LOG: listening on IPv6 address "::", port 5432 Awesome-project_apistar | [2018-11-28 03:30:49 +0000] [7] [ERROR] Exception in worker process Awesome-project_apistar | Traceback (most recent call last): Awesome-project_apistar | File "/usr/local/lib/python3.6/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker5d4b92e84: Downloading [=====================> ] 127.4MB/298.1MB Awesome-project_apistar | worker.init_process() ] 111.3MB/298.1MB Awesome-project_apistar | File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/base.py", line 129, in init_process Pulling from puckel/docker-airflow Awesome-project_apistar | self.load_wsgi() Awesome-project_apistar | File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi6fad884: Pull complete Awesome-project_apistar | self.wsgi = self.app.wsgi() Awesome-project_apistar | File "/usr/local/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi Awesome-project_apistar | self.callable = self.load() ] 104.3MB/298.1MB Awesome-project_apistar | File "/usr/local/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load Awesome-project_apistar | return self.load_wsgiapp() Awesome-project_apistar | File "/usr/local/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp Awesome-project_apistar | return util.import_app(self.app_uri) Awesome-project_apistar | File "/usr/local/lib/python3.6/site-packages/gunicorn/util.py", line 350, in import_app Awesome-project_apistar | __import__(module) Awesome-project_apistar | ModuleNotFoundError: No module named 'app' Awesome-project_apistar | [2018-11-28 03:30:49 +0000] [7] [INFO] Worker exiting (pid: 7)

I don't really know much about docker so I don't know stuff to modify. The first thing I noticed was on Step 3/4 where it talks about the directory.

The error shows up after gunicorn starts and a worker thread hits the ModuleNotFoundError.

Any ideas?

@theforgottenmachine
Copy link
Author

theforgottenmachine commented Nov 28, 2018

Just wanted to add to this. I have now tried the same steps on a Mac and on an Ubuntu install. They both work great. The warning re. the home directory still came up. But the difference was that starting apistar just generated a line of output.

It's this ModuleNotFoundError that is throwing me off. Maybe it could have something to do with the paths specified in the docker-compose file? @jgoerner

thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants