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

Update versions and cleanup Dockerfile #84

Merged
merged 13 commits into from
Jan 14, 2019
Merged

Conversation

humitos
Copy link
Member

@humitos humitos commented Jan 2, 2019

I'd like to build this image and ship it sooner than later.

We have been testing 4.0rc1 on some projects now. Although, this image removes Python 3.5 completely and upgrade all Python and Conda versions. Besides, it installs all the software requested by users and fixes some new pyenv dependencies.

I'd love to:

  • deprecate 2.0,
  • make the 3.0 the default and stable image,
  • make latest to be 4.0rc1

Also, we do support numbered versions in our YAML file (see also here), we could start also testing or suggesting 5.0rc1 (the image of this PR). I want to pick some projects to start testing 5.0rc1 for a month (not more than that) and make the version changes again:

  • make the 4.0 the default and stable image,
  • make latest to be 5.0rc1

Our process to release images is too slow and I'd like to move faster here.

I just tested building and running this image locally with different build projects and it worked properly. I could be more extensively tested with projects that require very specific things, though.

NOTE: I also implemented some of the ideas listed under #60

Closes #79
Closes #78
Closes #70
Closes #15

@humitos
Copy link
Member Author

humitos commented Jan 2, 2019

Just a note, latest ubuntu:18:04 at today is

$ docker pull ubuntu:18.04
18.04: Pulling from library/ubuntu
Digest: sha256:868fd30a0e47b8d8ac485df174795b5e2fe8a6c8f056cc707b232d65b8a1ab68
Status: Image is up to date for ubuntu:18.04

@humitos
Copy link
Member Author

humitos commented Jan 2, 2019

docker images from my computer,

readthedocs/build      5.0.0rc1            dd797b2e2cf4    ....    6.14GB
readthedocs/build      4.0.0rc1            7d72f497940d    ....    6.74GB

docker images from build01.org,

readthedocs/build   4.0rc1              95575448a59a        ....    6.77GB
readthedocs/build   3.0                 21110214e6a0        ....    8.86GB
readthedocs/build   latest              6b9ab0a5ddaf        ....    8.86GB
readthedocs/build   2.0                 9468fcb95b87        ....    5.48GB

So, with 5.0.0rc1 we have a little smaller image (~600Mb).

@stsewd stsewd mentioned this pull request Jan 2, 2019
@ericholscher
Copy link
Member

I'm +1 on shipping new images. If we hit issues, we can work around them, but sitting still isn't the answer. I'd say we should just ship 4.0, no rc1 needed. So default is 3.0, latest is 4.0, and we can start testing a 5.0.

@graup graup mentioned this pull request Jan 7, 2019
9 tasks
Copy link
Member

@ericholscher ericholscher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. When this is merged, it will become latest, right? I do worry about possibly breaking people who are using Python 3.5, but there shouldn't be too many.

@agjohnson
Copy link
Contributor

There's already a 4.0rc1. Next release is 4.0 anyways.

Dockerfile Outdated
ENV PATH $PATH:/home/docs/.conda/bin
RUN rm -f Miniconda3-${CONDA_VERSION}-Linux-x86_64.sh
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is miniconda3 a python3 binary? does this require us to make sure the project is using python3 before executing? If so, do we have a similar .org change that prevents breaking existing python2 conda projects?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is the difference,

There are two variants of the installer: Miniconda is Python 2 based and Miniconda3 is Python 3 based. Note that the choice of which Miniconda is installed only affects the root environment. Regardless of which version of Miniconda you install, you can still install both Python 2.x and Python 3.x environments.

This one, affects us since if the user was not specifying the Python version when using conda we will defaulting to python3.

The other difference is that the Python 3 version of Miniconda will default to Python 3 when creating new environments and building packages.

https://conda.io/miniconda.html

I'm going to revert this change because it's a potential breaking change. Considering that we are defaulting python3 for new projects, it would be good to find a way to use py2 only in old conda projects, though.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps use both miniconda2 and miniconda3? or are they not compatible?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will research a little more about this. I'm not sure what should be the flow. I'm creating a ticket for this since it will be something new and unrelated with this PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a problem either way it seems. For now, this image will be correct, but when we move to default python3, new projects will have to specify python2 to use conda.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so. The project.python_interpreter is not used at all when building with conda. It's only used to create the virtual environment.

Dockerfile Show resolved Hide resolved
This commit also removes Python 3.5
This is requested for different users for different purposes

See #15

Closes #15
Here is the difference,

> There are two variants of the installer: Miniconda is Python 2 based and Miniconda3 is Python 3 based. Note that the choice of which Miniconda is installed only affects the root environment. Regardless of which version of Miniconda you install, you can still install both Python 2.x and Python 3.x environments.

This one, affects us since if the user was not specifying the Python version when using `conda` we will defaulting to `python3`.

> The other difference is that the Python 3 version of Miniconda will default to Python 3 when creating new environments and building packages.

https://conda.io/miniconda.html

Considering that we are defaulting `python3` for new projects, it would be good to find a way to use `py2` only in old conda projects, though.
@humitos humitos merged commit e6f4f0b into master Jan 14, 2019
@humitos humitos deleted the humitos/update-versions branch January 14, 2019 17:59
humitos added a commit that referenced this pull request May 16, 2019
Python 3.5 was removed at
#84 and we
didn't have a good reason to do it.

Then, when releasing the new Docker 5.0 image we realize that we will
be breaking some projects that are pinning 3.5 in their config file:
readthedocs/readthedocs.org#5657

So, we decided to re-add it to be able to deploy this image without
breaking people's projects.
@humitos humitos mentioned this pull request May 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants