Skip to content

rp flash deploy fails when requirements.txt has an inline comment #721

Open

Description

@irisfield

Describe the bug

A requirements.txt line with an inline comment, such as requests==2.32.3 # http client, makes rp flash deploy fail during dependency vendoring. The error ends with a hint about packages without Linux wheels, which does not apply to requests. pip itself accepts the same file with pip install -r requirements.txt.

To Reproduce

  1. In a Flash project, create requirements.txt containing:
    requests==2.32.3  # http client
    
  2. Run rp flash deploy --build-only:
    Error: dependency vendoring failed:
    ERROR: Invalid requirement: 'requests==2.32.3  # http client': Expected comma (within version specifier), semicolon (after version specifier) or end
        requests==2.32.3  # http client
                ~~~~~~~~~~^
    
    packages without linux wheels cannot be vendored; exclude them (they must then come from the image)
    

In addition, a -r extra.txt line is skipped without a warning. With requirements.txt containing requests==2.32.3 and -r extra.txt, and extra.txt containing numpy==2.1.3, the build succeeds, but numpy is not in the built artifact.

Expected behavior

  1. Inline comments are ignored, as pip ignores them, and the deploy vendors requests==2.32.3.
  2. A -r line is either followed, or the deploy stops with an error that names the line it does not support.

Environment

  • OS: Arch Linux (WSL2)
  • Python: 3.12
  • Version: runpod 2.1.0

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions