Skip to content
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

Migrate to uv #174

Open
phette23 opened this issue Jan 13, 2025 · 1 comment
Open

Migrate to uv #174

phette23 opened this issue Jan 13, 2025 · 1 comment
Labels
enhancement python Pull requests that update Python code

Comments

@phette23
Copy link
Member

With how frustrating it was upgrading to Django 4.2 with pipenv's vague error messages, I am more tempted than ever to migrate to uv. The speedup of our image builds would also benefit.

@phette23 phette23 added enhancement python Pull requests that update Python code labels Jan 13, 2025
@phette23
Copy link
Member Author

cookiecutter-uv can offer some good guidance, in particular this is their Dockerfile:

# Install uv
FROM python:3.12-slim
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv

# Change the working directory to the `app` directory
WORKDIR /app

# Copy the lockfile and `pyproject.toml` into the image
ADD uv.lock /app/uv.lock
ADD pyproject.toml /app/pyproject.toml

# Install dependencies
RUN uv sync --frozen --no-install-project

# Copy the project into the image
ADD . /app

# Sync the project
RUN uv sync --frozen

CMD [ "python", "example_project/foo.py"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement python Pull requests that update Python code
Projects
None yet
Development

No branches or pull requests

1 participant