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

Add docker image for BERT e2e inference task #455

Merged
merged 8 commits into from
Jul 16, 2024
64 changes: 51 additions & 13 deletions e2e2/test/images/bert-inference/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,58 @@ FROM nvidia/cuda:12.5.0-devel-ubuntu22.04
# Set environment variable to disable interactive prompts
ENV DEBIAN_FRONTEND=noninteractive

# Install Python 3.11
RUN apt-get update && apt-get install -y \
software-properties-common && \
add-apt-repository ppa:deadsnakes/ppa && \
apt-get update && \
apt-get install -y \
python3.11 \
python3.11-dev \
python3.11-distutils \
python3-pip && \
rm -rf /var/lib/apt/lists/*
# Dependency version numbers
ARG PYTHON=python3.10
ARG PYTHON_VERSION=3.10.12
ARG PIP=pip3

# Create a symbolic link to use python3.11 as python
RUN ln -sf /usr/bin/python3.11 /usr/bin/python
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
cmake \
curl \
emacs \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you can trim any of these out I would but nbd 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually only included those because they were in our other images - https://github.com/aws/aws-k8s-tester/blob/cc66356a28d11fdd4a60573d2a2bbe502a14dbab/e2e2/test/images/neuron/Dockerfile#L39C1-L43C10

Was just trying to keep things consistent and start to identify common patterns amongst our images. Maybe these are required in the other image...? If not, I would definitely advocate for us to remove.

Copy link
Contributor

@ndbaker1 ndbaker1 Jul 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea agreed, its not blocking me though

git \
jq \
libopencv-dev \
software-properties-common \
wget \
unzip \
vim \
pkg-config \
gdb \
lcov \
libbz2-dev \
zlib1g-dev \
openssl \
libssl-dev \
libsqlite3-dev \
libgdbm-dev \
libc6-dev \
libbz2-dev \
libncurses-dev \
tk-dev \
libffi-dev \
libcap-dev \
gnupg2 \
gpg-agent \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean

# Install Python
RUN wget -q https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tgz \
&& tar -xzf Python-$PYTHON_VERSION.tgz \
&& cd Python-$PYTHON_VERSION \
&& ./configure --enable-shared --prefix=/usr/local \
&& make -j $(nproc) && make install \
&& cd .. && rm -rf ../Python-$PYTHON_VERSION* \
&& ln -s /usr/local/bin/pip3 /usr/bin/pip \
&& ln -s /usr/local/bin/$PYTHON /usr/local/bin/python \
&& ${PIP} --no-cache-dir install --upgrade \
pip \
setuptools

# Set the working directory in the container
WORKDIR /app
Expand Down
Loading