File size: 1,558 Bytes
bfd30b7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
ARG BASE_IMAGE=mambaorg/micromamba
ARG BASE_TAG=1.5-jammy
ARG MAMBA_PYTHON_VERSION=3.10
FROM --platform=linux/amd64 ${BASE_IMAGE}:${BASE_TAG}
ARG MAMBA_PYTHON_VERSION
ENV DEBIAN_FRONTEND=noninteractive
WORKDIR /usr/src/app
USER root
RUN apt-get --allow-releaseinfo-change update \
&& apt-get -y install --no-install-recommends \
apt-utils \
dialog 2>&1 \
&& apt-get install -y --no-install-recommends \
git \
gpg \
wget \
man-db \
procps \
tree \
unzip \
gcc \
build-essential \
lsb-release \
curl \
vim \
exuberant-ctags \
apt-transport-https \
ca-certificates \
gnupg \
sudo \
libgl1-mesa-glx \
libxrender1 \
rsync \
libtiff-dev \
&& apt-get autoclean \
&& apt-get autoremove \
&& rm -rf /var/lib/apt/lists/*
# Install conda env
RUN micromamba install -y -n base -c conda-forge \
pyopenssl=23.2.0 \
python=${MAMBA_PYTHON_VERSION} \
requests=2.25.1 \
conda-forge::boost \
aivant::openstructure \
anaconda::py-boost \
vina \
git \
&& micromamba clean --all --yes
ARG MAMBA_DOCKERFILE_ACTIVATE=1 # (otherwise python will not be found)
ENV BASH_ENV=/usr/local/bin/_activate_current_env.sh
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/conda/lib
# install dependencies
ADD requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
EXPOSE 7860
ENV GRADIO_SERVER_NAME="0.0.0.0"
ADD . .
# Prepare user
USER $MAMBA_USER
ENTRYPOINT ["/usr/local/bin/_entrypoint.sh"]
CMD ["python", "inference_app.py"] |