39 lines
1.2 KiB
Docker
39 lines
1.2 KiB
Docker
FROM public.ecr.aws/ubuntu/ubuntu:22.04_stable as builder
|
|
|
|
RUN apt-get update -y
|
|
RUN apt-get install -y wget
|
|
RUN wget https://github.com/peak/s5cmd/releases/download/v2.2.2/s5cmd_2.2.2_Linux-64bit.tar.gz
|
|
RUN tar xzvf s5cmd_2.2.2_Linux-64bit.tar.gz
|
|
|
|
FROM public.ecr.aws/ubuntu/ubuntu:22.04_stable
|
|
|
|
COPY --from=builder /s5cmd /usr/local/bin/
|
|
|
|
SHELL ["/bin/bash", "-c"]
|
|
|
|
RUN adduser --disabled-password --gecos '' ubuntu
|
|
|
|
RUN apt-get update -y && \
|
|
apt-get install --no-install-recommends -y git libgl1 libtcmalloc-minimal4 libglib2.0-0 python3.10 python3.10-venv net-tools bc && \
|
|
# may not needed in endpoint
|
|
apt-get install --no-install-recommends -y pkg-config file curl protobuf-compiler mesa-utils && \
|
|
# for env install
|
|
apt-get install --no-install-recommends -y tar python3-dev libcairo2-dev libprotobuf-dev build-essential cmake wget && \
|
|
# clean up
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY inference/metrics.py /
|
|
RUN chmod +x /metrics.py
|
|
|
|
WORKDIR /home/ubuntu/
|
|
|
|
ENV ON_DOCKER true
|
|
ENV FULL_IMAGE false
|
|
|
|
ENV LD_PRELOAD /usr/lib/x86_64-linux-gnu/libtcmalloc_minimal.so.4
|
|
|
|
COPY inference/serve.sh /
|
|
RUN chmod +x /serve.sh
|
|
|
|
ENTRYPOINT ["bash", "/serve.sh"]
|