-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from AllenInstitute/feature/switch-to-uv
Switch to using uv and ruff
- Loading branch information
Showing
59 changed files
with
1,262 additions
and
338 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,35 @@ | ||
FROM public.ecr.aws/lts/ubuntu:22.04_stable | ||
|
||
ARG PYTHON_VERSION=3.11 | ||
ARG UV_VERSION=0.5.18 | ||
|
||
# Update and install deps | ||
RUN apt-get update -y && apt-get install -y \ | ||
python3.9 \ | ||
# uv installer requires curl (and certificates) to download the release archive | ||
RUN apt-get update -y && apt-get install -y --no-install-recommends \ | ||
curl \ | ||
ca-certificates \ | ||
python${PYTHON_VERSION} \ | ||
python3-pip | ||
|
||
# Download the latest installer | ||
# ENV UV_INSTALL_DIR="/opt/.uv" | ||
# ENV UV_UNMANAGED_INSTALL="/opt/.uv" | ||
RUN if [ -n "$UV_VERSION" ]; then \ | ||
curl -sSL "https://astral.sh/uv/${UV_VERSION}/install.sh" -o /uv-installer.sh; \ | ||
else \ | ||
curl -sSL "https://astral.sh/uv/install.sh" -o /uv-installer.sh; \ | ||
fi | ||
|
||
# Run the installer then remove it | ||
RUN env UV_INSTALL_DIR='/opt/.uv' UV_UNMANAGED_INSTALL="/opt/.uv" sh /uv-installer.sh \ | ||
&& rm /uv-installer.sh | ||
|
||
COPY . /opt/python/aibs-informatics-core/ | ||
|
||
WORKDIR /opt/python/aibs-informatics-core | ||
RUN pip3 install --no-cache-dir . | ||
RUN /opt/.uv/uv pip install --system . | ||
WORKDIR / | ||
|
||
RUN rm -rf /opt/.uv | ||
|
||
CMD ["python3"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.