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

Downgrade R in Docker image #685

Merged
merged 6 commits into from
Jun 2, 2020
Merged

Downgrade R in Docker image #685

merged 6 commits into from
Jun 2, 2020

Conversation

rshkv
Copy link

@rshkv rshkv commented Jun 1, 2020

Problem. In #677 we upgraded our Docker images to Ubuntu 20. As result of that we started picking up a higher R version (3.6), whereas we previously used 3.2 (latest available for Ubuntu 14).

Because 3.5 and 3.6 are major releases with serialization breaks, we started compiling a SparkR that is incompatible with the R versions we have to support internally (as low as 3.3). This caused errors like the one below (workspace serialization break in 3.5):

cannot read workspace version 3 written by R 3.6.3; need R 3.5.0 or newer

Or the one below (courtesy of the data serialization break in 3.6):

Error in rbind(info, getNamespaceInfo(env, "S3methods")) :
  number of columns of matrices must match (see arg 2)

More info on this RStudio issue and release announcements for 3.5 and 3.6.

Change. This change ensures that we compile SparkR using R 3.4. We have to support 3.3 internally, but 3.4 had no breaks. We also have to support 3.5, and I assume 3.4 is good because 3.2 was - I don't believe we internally read 3.2 workspaces with 3.6 and vice versa.

I switched to installing R via Conda instead of Apt. CRAN has channels hosting older R versions, but those channels don't host R's dependencies.

@rshkv rshkv force-pushed the wr/downgrade-r branch from 11cad08 to 71eda88 Compare June 1, 2020 13:31
@@ -111,7 +111,7 @@ WORKDIR $CIRCLE_HOME
# Install miniconda, we are using it to test conda support and a bunch of tests expect CONDA_BIN to be set
ENV CONDA_ROOT=$CIRCLE_HOME/miniconda
ENV CONDA_BIN=$CIRCLE_HOME/miniconda/bin/conda
ENV MINICONDA2_VERSION=4.5.11
ENV MINICONDA2_VERSION=4.7.12.1
Copy link
Author

Choose a reason for hiding this comment

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

This is to get a later Python 2 version. There is a bad interaction between libffi and older Python versions (conda/conda#9884).

@@ -15,27 +15,29 @@
# limitations under the License.
#

FROM palantirtechnologies/circle-spark-base
FROM palantirtechnologies/circle-spark-base:0.2.3
Copy link
Author

Choose a reason for hiding this comment

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

Otherwise this defaults to latest.

&& cat >>.bashrc <<<'eval "$($HOME/.pyenv/bin/pyenv init -)"' \
&& cat >>.bashrc <<<'eval "$($HOME/.pyenv/bin/pyenv virtualenv-init -)"'
RUN curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
ENV PATH="$CIRCLE_HOME/.pyenv/shims:$CIRCLE_HOME/.pyenv/bin:$PATH"
Copy link
Author

Choose a reason for hiding this comment

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

Had to replace the .bashrc edits so they don't override my path hackery below.

@rshkv rshkv requested a review from robert3005 June 2, 2020 00:32
@rshkv rshkv changed the title Downgrade R Downgrade R in Docker image Jun 2, 2020
@rshkv rshkv merged commit 80c23bb into master Jun 2, 2020
@rshkv rshkv deleted the wr/downgrade-r branch June 2, 2020 16:37
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

Successfully merging this pull request may close these issues.

2 participants