Skip to content

Conversation

@dannon
Copy link
Member

@dannon dannon commented Jan 15, 2026

  • Set PYTHONPATH in container for Galaxy library access (not a new issue, but enables using this container to import Galaxy modules directly without requiring full Galaxy startup)
  • Fix .dockerignore to exclude node_modules at all depths (was copying 22GB client/node_modules)
  • Strip inline # type: comments from conditional-requirements.txt before ansible runs (newer pip rejects them as CLI args)

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

Makes Galaxy's lib/ modules (galaxy, galaxy_ext, tool_shed, etc.)
importable without requiring the full Galaxy startup.
The pattern `node_modules` only matches at the root level in
.dockerignore (unlike .gitignore). Use `**/node_modules` to
exclude client/node_modules and avoid copying 22GB to the
build context.
The ansible role passes requirement lines directly to pip as CLI
arguments. Newer pip versions reject inline comments like
`# type: webdav`. Strip these before running the playbook.
@dannon dannon marked this pull request as ready for review January 15, 2026 13:35
@github-actions github-actions bot added this to the 26.0 milestone Jan 15, 2026
@guerler guerler modified the milestones: 26.0, 25.1 Jan 20, 2026
COPY . $SERVER_DIR/

# Strip inline comments from conditional-requirements.txt (ansible role passes lines directly to pip)
RUN sed -i 's/[[:space:]]*# type:.*$//' $SERVER_DIR/lib/galaxy/dependencies/conditional-requirements.txt
Copy link
Member

Choose a reason for hiding this comment

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

I'd imagine this would also be an issue for ansible-galaxy ?

Copy link
Member

Choose a reason for hiding this comment

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


ENV PATH="$SERVER_DIR/.venv/bin:${PATH}"
ENV GALAXY_CONFIG_CONDA_AUTO_INIT=False
ENV PYTHONPATH="$SERVER_DIR/lib/"
Copy link
Member

Choose a reason for hiding this comment

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

Does that not mess with the tool execution environment ? it may be fine but may also be a gotcha later on

Copy link
Member Author

Choose a reason for hiding this comment

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

Would love a sanity check from other deployments of the container -- this fixed problems I had but I can maintain it as a patch if need be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants