Skip to content

Commit

Permalink
Merge pull request #384 from danielballan/slimmer-image
Browse files Browse the repository at this point in the history
Slim down the Docker image.
  • Loading branch information
danielballan committed Feb 1, 2023
2 parents c62d88a + fb231f4 commit 73f1ad0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RUN npm install && npm run build

# We cannot upgrade to Python 3.11 until numba supports it.
# The `sparse` library relies on numba.
FROM python:3.10 as base
FROM python:3.10-slim as builder
WORKDIR /code

# Ensure logs and error messages do not get stuck in a buffer.
Expand Down Expand Up @@ -44,7 +44,11 @@ RUN pip install '.[array, compression, dataframe, formats, server, sparse, xarra
# RUN pip install -r requirements-dev.txt
# RUN pytest -v

FROM base as app
FROM python:3.10-slim as runner

ENV VIRTUAL_ENV=/opt/venv
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
COPY --from=builder $VIRTUAL_ENV $VIRTUAL_ENV

WORKDIR /deploy

Expand Down

0 comments on commit 73f1ad0

Please sign in to comment.