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

Fixing docker image building issues. #612

Merged
merged 1 commit into from
Nov 15, 2023
Merged
Changes from all commits
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
14 changes: 2 additions & 12 deletions deploy/api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
FROM debian:buster-slim
FROM python:3.11

ARG SM_ENVIRONMENT

ENV MAMBA_ROOT_PREFIX /root/micromamba
ENV PATH $MAMBA_ROOT_PREFIX/bin:$PATH
ENV PORT 8000
ENV SM_ENVIRONMENT ${SM_ENVIRONMENT}
# Allow statements and log messages to immediately appear in the Knative logs.
Expand All @@ -14,15 +12,7 @@ EXPOSE $PORT
WORKDIR /app/sample_metadata/
COPY requirements.txt requirements.txt

RUN apt-get update && \
apt-get install -y wget bash bzip2 zip build-essential && \
rm -r /var/lib/apt/lists/* /var/cache/apt/* && \
wget -qO- https://api.anaconda.org/download/conda-forge/micromamba/0.8.2/linux-64/micromamba-0.8.2-he9b6cbd_0.tar.bz2 | tar -xvj -C /usr/local bin/micromamba && \
mkdir $MAMBA_ROOT_PREFIX && \
micromamba install -y --prefix $MAMBA_ROOT_PREFIX -c conda-forge \
python=3.10 pip && \
pip install -r requirements.txt && \
rm -r /root/micromamba/pkgs
RUN pip install --no-cache-dir -r requirements.txt

COPY api api
COPY db db/
Expand Down
Loading