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