Skip to content

bug: Nested requirements.txtof pythonExtension() fails during build of deployment + requirements warning #1843

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

Open
luap2703 opened this issue Mar 28, 2025 · 1 comment

Comments

@luap2703
Copy link

Provide environment information

  System:
    OS: macOS 15.2
    CPU: (12) arm64 Apple M2 Pro
    Memory: 99.23 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.19.0 - /opt/homebrew/bin/node
    Yarn: 4.5.1 - /opt/homebrew/bin/yarn
    npm: 10.8.2 - /opt/homebrew/bin/npm

Describe the bug

When deploying to production using pythonExtension and a nested requirements.txt, the build fails with following logs:

#11 DONE 82.8s
#12 [base 2/6] RUN apt-get update && apt-get install -y --no-install-recommends               python3 python3-pip python3-venv &&               apt-get clean && rm -rf /var/lib/apt/lists/*
#12 CACHED
#13 [base 3/6] RUN python3 -m venv /opt/venv
#13 CACHED
#14 [base 4/6] COPY ./packages/core/core-analytics/python/requirements.txt .
#14 DONE 0.1s
#15 [base 5/6] RUN pip install --no-cache-dir -r ./packages/core/core-analytics/python/requirements.txt
#15 0.278 ERROR: Could not open requirements file: [Errno 2] No such file or directory: './packages/core/core-analytics/python/requirements.txt'
#15 ERROR: process "/bin/sh -c pip install --no-cache-dir -r ./packages/core/core-analytics/python/requirements.txt" did not complete successfully: exit code: 1
------
> [base 5/6] RUN pip install --no-cache-dir -r ./packages/core/core-analytics/python/requirements.txt:
#15 0.278 ERROR: Could not open requirements file: [Errno 2] No such file or directory: './packages/core/core-analytics/python/requirements.txt'
------
Error: failed to solve: process "/bin/sh -c pip install --no-cache-dir -r ./packages/core/core-analytics/python/requirements.txt" did not complete successfully: exit code: 1

Using the exact same requirements.txt in the root folder works as expected.

Also, a warning stating...

▲ [WARNING] [pythonExtension] Both options.requirements and options.requirementsFile are specified. requirements will be ignored.

...occurs although no requirements: [] is present.

Reproduction repo

https://github.com/SilkHubCo/python-crawl4ai

To reproduce

We initialized the basic python crawl example and moved the requirements.txt to the python folder.

Additional information

No response

@luap2703 luap2703 changed the title bug: Nested requirements.txt fails during build of deployment + requirements warning bug: Nested requirements.txtof pythonExtension() fails during build of deployment + requirements warning Mar 28, 2025
@azlekov
Copy link

azlekov commented Apr 15, 2025

I can confirm that requirements.txt in a nested folder (not the root) failed. I move mine to the root folder and now it's okay.

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

No branches or pull requests

2 participants