Skip to content

Commit

Permalink
feat: Add pixi as option for project env manager (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
lsetiawan authored Jul 23, 2024
1 parent ca503af commit f3432c0
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions base-image/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
ARG BASE_IMAGE=mambaorg/micromamba:1.5.8-noble
ARG PIXI_VERSION=0.26.1
FROM --platform=$BUILDPLATFORM $BASE_IMAGE

# Echo some info about platforms
ARG TARGETPLATFORM
ARG BUILDPLATFORM
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM"

# Specify arg again here
ARG PIXI_VERSION

# Set image metadata labels
LABEL org.opencontainers.image.title="SSEC Base Image"
LABEL org.opencontainers.image.version="0.1"
Expand Down Expand Up @@ -58,15 +62,24 @@ RUN chown -R ${NB_USER}:${NB_USER} /srv
# Install basic apt packages
RUN echo "Installing Apt-get packages..." \
&& apt-get update --fix-missing > /dev/null \
&& apt-get install -y wget zip tzdata > /dev/null \
&& apt-get install -y wget zip tzdata curl > /dev/null \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Set conda alias to micromamba
RUN echo "alias conda='micromamba'" >> ${HOME}/.bashrc


# Install Pixi
# download the musl build since the gnu build is not available on aarch64
RUN curl -Ls \
"https://github.com/prefix-dev/pixi/releases/download/v${PIXI_VERSION}/pixi-$(uname -m)-unknown-linux-musl" \
-o /pixi && chmod +x /pixi
RUN /pixi --version
RUN cp /pixi /usr/local/bin/pixi

# Add TZ configuration - https://github.com/PrefectHQ/prefect/issues/3061
ENV TZ UTC
ENV TZ=UTC
# ========================

USER ${NB_USER}
Expand Down

0 comments on commit f3432c0

Please sign in to comment.