Skip to content

Fully migrate to UV #336

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

Merged
merged 2 commits into from
Apr 4, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 6 additions & 12 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
FROM pennlabs/django-base:b269ea1613686b1ac6370154debbb741b012de1a-3.11
ARG DEPENDENCY_MANAGER="uv"
FROM pennlabs/django-base:11d476546bd11c7a499e0e93be8db6af035d360f-3.11

LABEL maintainer="Penn Labs"

# Install uv
COPY --from=ghcr.io/astral-sh/uv@sha256:2381d6aa60c326b71fd40023f921a0a3b8f91b14d5db6b90402e65a635053709 /uv /uvx /bin/

# Copy project dependencies
COPY Pipfile* pyproject.toml uv.lock /app/

# Install dependencies using uv or pipenv depending on DEPENDENCY_MANAGER arg
RUN if [ "$DEPENDENCY_MANAGER" = "uv" ]; then \
uv sync --frozen --no-dev --no-install-project --python $(which python); \
mv /app/.venv/bin/uwsgi /usr/local/bin/uwsgi; \
mv /app/.venv/bin/gunicorn /usr/local/bin/gunicorn; \
else \
pipenv install --system; \
fi
COPY pyproject.toml uv.lock /app/

Run uv sync --frozen --no-dev --no-install-project --python $(which python); \
ln -s /app/.venv/bin/uwsgi /usr/local/bin/uwsgi; \
ln -s /app/.venv/bin/gunicorn /usr/local/bin/gunicorn

# Make installed binaries available for POSIX compliant scripts
ENV PATH="/app/.venv/bin:$PATH"
Expand Down
51 changes: 0 additions & 51 deletions backend/Pipfile

This file was deleted.

Loading
Loading