You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While there is no perfect docker / deployment story for rye yet, at the very least how to use the current lockfiles with pip should be documented. Refs #239
The text was updated successfully, but these errors were encountered:
Recently I am facing the same problem, and according some look up at #239 I have had my problem solved in a workaround:
FROM python:3.11.0-slim-bullseye AS builder
WORKDIR /company/project
COPY ./requirements.lock /company/project
COPY ./pyproject.toml /company/project
COPY ./src/ /company/project/src
RUN python -m pip install --no-cache-dir --upgrade pip
RUN sed '/-e/d' requirements.lock > requirements.txt
RUN sed -i 's/requires = \["hatchling"\]/requires = \["setuptools", "setuptools-scm"\]/; s/build-backend = "hatchling.build"/build-backend = "setuptools.build_meta"/' pyproject.toml
RUN sed -i '/\[tool\.hatch\.metadata\]/d; /allow-direct-references = true/d' pyproject.toml
RUN pip install --upgrade setuptools
RUN pip install -r requirements.txt
RUN pip install .
CMD ["python3", "./src/project/main.py"]
I dont't know why useing hatching build (rye default) with pip install . would fail, so I replace it with setuptools according to it's docs and pip install . works.
Trying to install it with the default installer in docker fails with an unhelpful error message:
FROM ubuntu
RUN apt update && apt install -yy curl
RUN curl -sSf https://rye-up.com/get | bash
3.861 Welcome to Rye!
3.861
3.861 This installer will install rye to /root/.rye
3.861 This path can be changed by exporting the RYE_HOME environment variable.
3.861
3.861 Details:
3.861 Rye Version: 0.29.0
3.861 Platform: linux (x86_64)
3.861
3.861 error: IO error: not a terminal
3.861
3.861 Caused by:
3.861 not a terminal
While there is no perfect docker / deployment story for rye yet, at the very least how to use the current lockfiles with pip should be documented. Refs #239
The text was updated successfully, but these errors were encountered: