Skip to content

Commit

Permalink
Merge pull request #2 from DireLines/make-smaller
Browse files Browse the repository at this point in the history
base off nvidia image instead of runpod pytorch base, 25 GB -> 15 GB
  • Loading branch information
justinmerrell authored Jun 14, 2023
2 parents e795e2d + 49a8794 commit 7a06c8f
Showing 1 changed file with 34 additions and 3 deletions.
37 changes: 34 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
FROM runpod/pytorch:3.10-2.0.0-117
FROM nvidia/cuda:11.7.1-cudnn8-runtime-ubuntu20.04

SHELL ["/bin/bash", "-o", "pipefail", "-c"]

WORKDIR /

SHELL ["/bin/bash", "-c"]
ENV DEBIAN_FRONTEND=noninteractive
ENV SHELL=/bin/bash
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu

# Build args
ARG MODEL_URL
ENV MODEL_URL=${MODEL_URL}
Expand All @@ -12,10 +17,36 @@ ENV MODEL_NAME=${MODEL_NAME}
ARG MODEL_TAG
ENV MODEL_TAG=${MODEL_TAG}

# Update and upgrade the system packages (Worker Template)
RUN apt-get update -y && \
apt-get upgrade -y && \
apt-get install --yes --no-install-recommends \
build-essential \
vim \
git \
wget \
software-properties-common \
google-perftools \
curl \
bash

RUN apt-get autoremove -y && \
apt-get clean -y && \
rm -rf /var/lib/apt/lists/* && \
add-apt-repository ppa:deadsnakes/ppa -y && \
apt-get install python3.10 -y --no-install-recommends && \
ln -s /usr/bin/python3.10 /usr/bin/python && \
rm /usr/bin/python3 && \
ln -s /usr/bin/python3.10 /usr/bin/python3 && \
which python && \
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
python get-pip.py && \
rm get-pip.py && \
pip install -U pip

# Install Python dependencies (Worker Template)
COPY builder/requirements.txt /requirements.txt
RUN pip install --upgrade pip && \
pip install -r /requirements.txt && \
RUN pip install --no-cache-dir -r /requirements.txt && \
rm /requirements.txt

# Fetch the model
Expand Down

0 comments on commit 7a06c8f

Please sign in to comment.