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

plotly extension + user lib installation bug #65

Merged
merged 4 commits into from
Aug 7, 2024

Conversation

Tianhao-Gu
Copy link
Collaborator

Enable Plotly plot + Users can now install any package they need using pip.

Screenshot 2024-08-06 at 3 58 04 PM

Copy link

codecov bot commented Aug 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 50.00%. Comparing base (883a2b4) to head (cd2e6ab).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #65   +/-   ##
=======================================
  Coverage   50.00%   50.00%           
=======================================
  Files           4        4           
  Lines         118      118           
=======================================
  Hits           59       59           
  Misses         59       59           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Dockerfile Outdated
# install pipenv
RUN pip3 install pipenv

# install python dependencies
COPY Pipfile* ./
RUN pipenv sync --system

# Update permissions on the Bitnami directory after Pipenv installs
# to ensure the Spark user can install packages properly within notebook.
RUN chown -R spark_user:spark /opt/bitnami
Copy link
Member

Choose a reason for hiding this comment

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

In my hands the bitnami chown takes a really long time and now will rerun anytime we change the python packages. Why does it need to be moved forward in the build? pip shouldn't touch it, right?

Same question for the yarn setup below, although that's fast

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think pipenv run by root changes owners of some of python lib dir. As a result, users sometimes failed use pip install.

Copy link
Member

Choose a reason for hiding this comment

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

The python lib dir is in /opt/bitnami?

Copy link
Member

Choose a reason for hiding this comment

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

What if we ran pipenv with the spark user?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Cannot run pipenv with spark user. python lib is in /opt/bitnami. Maybe docker works even differently on linux and mac? chown is cached with mac and it only takes less than a minutes to build for me.

Copy link
Member

Choose a reason for hiding this comment

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

How is that possible when that directory is chowned to spark?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

no clue. That's why I think the safest way is to run RUN chown -R spark_user:spark /opt/bitnami after we done modifying that dir.

Copy link
Member

Choose a reason for hiding this comment

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

This makes no sense whatsoever. Why would setting $HOME to /opt/bitnami fix a permissions error?

Copy link
Member

Choose a reason for hiding this comment

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

Ok, how about we leave home as /opt/bitnami for now but make a ticket to look into this weirdness at some point. At least we'll have a record if something similar starts happening

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

👍 #66

@Tianhao-Gu Tianhao-Gu merged commit 10c0c7d into main Aug 7, 2024
9 checks passed
@Tianhao-Gu Tianhao-Gu deleted the dev_plotly_extension branch August 7, 2024 21:48
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