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
Simplify Docker image #815
Conversation
Use python:3.8.2-buster as the base image. This reduces the final image size by 500MB and significantly reduces the amount of total disk space occupied. There is room for further reducing the image size, by basing on python:3.8.2-slim-buster, or even debian:buster itself. However, that would require quite a bit more work. Basing on the non-slim version has the advantage that all python build dependencies are automatically included, because python:3.8.2-buster builds python from scratch and keeps the build dependencies. The xfvb part of the old Dockerfile has been removed, but not yet added to the CircleCI config.
Since I don't have experience with CircleCI, some pointers in that direction would be helpful |
Thanks @dalcde ! To use this image in CI of this PR you would need to build it, upload under some temporary path to Docker Hub and change the path in https://github.com/iodide-project/pyodide/blob/f7adad7eb30a54ce4ed82e6e15950931c77dd1cc/.circleci/config.yml#L6 Once it passes I will then be able to upload it under the pyodide account. |
There are no tests in packages/micropip/micropip/. However, to determine that, python needs distutils to be present in the host, and it is not.
Since firefox and chrome are run in headless mode. We probably don't need xvfb...
I can reproduce the |
The docker container now contains libtinfo5
#716 explains/observes the |
Yes, for now maybe manually install the same firefox version as the previous setup. It shouldn't matter too much size wise I think. Then we can investigate this. I also leaves the flexibility to update firefox versions instead of being fixed what's provided by the distribution. The |
The test_open_url_cgi failure happens consistently with both browsers, and I believe is responsible for the pandas fail as well. However, I cannot reproduce it on my own machine, just on CI. |
I also can't reproduce test_open_url_cgi failure with this image locally. Let me try to reset CI cache. |
# Get firefox 70.0.1 and geckodriver | ||
RUN wget -qO- https://ftp.mozilla.org/pub/firefox/releases/70.0.1/linux-x86_64/en-US/firefox-70.0.1.tar.bz2 | tar jx \ | ||
&& ln -s $PWD/firefox/firefox /usr/local/bin/firefox \ | ||
&& wget -qO- https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux64.tar.gz | tar zxC /usr/local/bin/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice use of pipes!
@@ -119,7 +111,7 @@ jobs: | |||
- run: | |||
name: test | |||
command: | | |||
pytest src packages/*/test* packages/micropip/micropip/ pyodide_build -v -k chrome | |||
pytest src packages/*/test* pyodide_build -v -k chrome |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There idea there was to run micropip doctests, but you are right that there aren't any at the moment.
Regardless of whether the issue was caused by caching (I doubt that in
this case, actually), do we actually want to cache emsdk? Right now
building binaryen is pretty fast, and is nowhere near our bottleneck.
(Also, our patching only affects wasm-opt, so we can conceivably skip
building the rest too)
|
I agree, we can probably stop caching it. I'm currently looking into refactoring CI following discussion in #76 (comment) and we can probably do it there once we have a better measure of the time to build emsdk in CI. |
It's a permission issue. After connecting with SSH to the CI instance, in the test server logs I see,
at the same time the permissions should be OK,
Even before this, I was thinking that we could replace our CGI test server with pytest-httpserver which in my experience is quite convenient, easier to debug and simpler. I'll look into it in a separate PR. |
Use python:3.8.2-buster as the base image. This reduces the final image size by 500MB and significantly reduces the amount of total disk space occupied. There is room for further reducing the image size, by basing on python:3.8.2-slim-buster, or even debian:buster itself. However, that would require quite a bit more work. Basing on the non-slim version has the advantage that all python build dependencies are automatically included, because python:3.8.2-buster builds python from scratch and keeps the build dependencies. The xfvb part of the old Dockerfile has been removed, but not yet added to the CircleCI config.
There are no tests in packages/micropip/micropip/. However, to determine that, python needs distutils to be present in the host, and it is not.
Since firefox and chrome are run in headless mode. We probably don't need xvfb...
The docker container now contains libtinfo5
OK, I pushed this image as Should be good to go as soon as CI passes. In terms of size it's indeed smaller by 500MB,
|
Use python:3.8.2-buster as the base image. This reduces the final image
size by 500MB and significantly reduces the amount of total disk space
occupied.
There is room for further reducing the image size, by basing on
python:3.8.2-slim-buster, or even debian:buster itself. However, that
would require quite a bit more work. Basing on the non-slim version has
the advantage that all python build dependencies are automatically
included, because python:3.8.2-buster builds python from scratch and
keeps the build dependencies.
The xfvb part of the old Dockerfile has been removed, but not yet added
to the CircleCI config.
Partially addressed #810