Closed Kanahiro closed 6 months ago
See also discussion at https://github.com/astral-sh/uv/issues/3180
Those instructions are specifically for a virtual project. Did you set virtual = true
in the pyproject.toml
as described?
If you want to build including the current project, you have to change the Dockerfile to something like:
FROM python:slim
WORKDIR /app
COPY requirements.lock ./
COPY pyproject.toml ./
COPY README.md ./
RUN PYTHONDONTWRITEBYTECODE=1 pip install --no-cache-dir -r requirements.lock
COPY src .
CMD python main.py
But the steps in the docs are correct as-is. You can't include the current project (-e file:///.
) as a dependency if you don't copy in the current project.
Thank you for kind responses!
https://github.com/astral-sh/rye/issues/1096#issuecomment-2121062364 this works for me.
Steps to Reproduce
Follow this step. https://github.com/astral-sh/rye/blob/main/docs/guide/docker.md#container-from-source
The error seems to be caused by line
-e file:.
in requirements.lock. Is it possible to disable to write this line? or other workaround?Expected Result
pip
to work.Actual Result
error occurs.
once the line
-e file:e
is removed, build steps work well.Version Info
rye 0.33.0 commit: 0.33.0 (58523f69f 2024-04-24) platform: macos (aarch64) self-python: cpython@3.12.3 symlink support: t
Stacktrace
No response