Skip to content

Commit

Permalink
Use new base image
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleykleynhans committed Apr 11, 2024
1 parent 8cddf7e commit 16b8642
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 335 deletions.
92 changes: 6 additions & 86 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,69 +1,18 @@
# Stage 1: Base
FROM nvidia/cuda:12.1.1-cudnn8-devel-ubuntu22.04 as base
ARG BASE_IMAGE
FROM ${BASE_IMAGE}

SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ENV DEBIAN_FRONTEND=noninteractive \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=on \
SHELL=/bin/bash

# Install Ubuntu packages
RUN apt update && \
apt -y upgrade && \
apt install -y --no-install-recommends \
software-properties-common \
python3.10-venv \
python3-pip \
python3-dev \
python3-tk \
bash \
dos2unix \
git \
git-lfs \
ncdu \
nginx \
net-tools \
openssh-server \
libglib2.0-0 \
libsm6 \
libgl1 \
libxrender1 \
libxext6 \
ffmpeg \
wget \
curl \
psmisc \
rsync \
vim \
zip \
unzip \
htop \
screen \
tmux \
pkg-config \
libcairo2-dev \
libgoogle-perftools4 \
libtcmalloc-minimal4 \
apt-transport-https \
ca-certificates && \
update-ca-certificates && \
apt clean && \
rm -rf /var/lib/apt/lists/* && \
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen

ENV PATH="/usr/local/cuda/bin:${PATH}"

# Set Python
RUN ln -s /usr/bin/python3.10 /usr/bin/python

# Stage 2: Install Web UI and python modules
FROM base as setup
SHELL=/bin/bash \
PATH="/usr/local/cuda/bin:${PATH}"

# Install Torch
ARG INDEX_URL
ARG TORCH_VERSION
WORKDIR /
RUN python3 -m venv /venv && \
RUN python3 -m venv --system-site-packages /venv && \
source /venv/bin/activate && \
pip3 install torch==${TORCH_VERSION} --index-url ${INDEX_URL} && \
deactivate
Expand Down Expand Up @@ -92,38 +41,9 @@ RUN source /venv/bin/activate && \
pip3 install -U autoawq && \
deactivate

# Install rclone
RUN curl https://rclone.org/install.sh | bash

# Install runpodctl
ARG RUNPODCTL_VERSION
RUN wget "https://github.com/runpod/runpodctl/releases/download/${RUNPODCTL_VERSION}/runpodctl-linux-amd64" -O runpodctl && \
chmod a+x runpodctl && \
mv runpodctl /usr/local/bin

# Install croc
RUN curl https://getcroc.schollz.com | bash

# Install speedtest CLI
RUN curl -s https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.deb.sh | bash && \
apt install speedtest

# Install Jupyter, gdown and OhMyRunPod
RUN pip3 install -U --no-cache-dir jupyterlab \
jupyterlab_widgets \
ipykernel \
ipywidgets \
gdown \
OhMyRunPod

# Install RunPod File Uploader
RUN curl -sSL https://github.com/kodxana/RunPod-FilleUploader/raw/main/scripts/installer.sh -o installer.sh && \
chmod +x installer.sh && \
./installer.sh

# NGINX Proxy
COPY nginx/nginx.conf /etc/nginx/nginx.conf
COPY nginx/api.html nginx/502.html /usr/share/nginx/html/
COPY nginx/api.html /usr/share/nginx/html/

# Remove existing SSH host keys
RUN rm -f /etc/ssh/ssh_host_*
Expand Down
4 changes: 2 additions & 2 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ variable "APP" {
}

variable "RELEASE" {
default = "1.15.1"
default = "1.16.0"
}

variable "CU_VERSION" {
Expand All @@ -19,10 +19,10 @@ target "default" {
tags = ["${USERNAME}/${APP}:${RELEASE}"]
args = {
RELEASE = "${RELEASE}"
BASE_IMAGE = "ashleykza/runpod-base:1.0.0-cuda12.1.1-torch2.2.1"
INDEX_URL = "https://download.pytorch.org/whl/cu${CU_VERSION}"
TORCH_VERSION = "2.2.1+cu${CU_VERSION}"
OOBABOOGA_COMMIT = "91a7370a655881c55274284509a546ffd644dc16"
RUNPODCTL_VERSION = "v1.14.2"
VENV_PATH = "/workspace/venvs/text-generation-webui"
}
}
61 changes: 0 additions & 61 deletions nginx/502.html

This file was deleted.

16 changes: 0 additions & 16 deletions scripts/fix_venv.sh

This file was deleted.

170 changes: 0 additions & 170 deletions scripts/start.sh

This file was deleted.

0 comments on commit 16b8642

Please sign in to comment.