Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions docker/Dockerfile.cuda
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,16 @@ FROM ${BASE_CUDA_DEV_CONTAINER} AS build
ARG RUST_TOOLCHAIN=stable

ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt/lists,sharing=locked \
apt-get update && \
apt-get install -y --no-install-recommends \
curl \
pkg-config \
libssl-dev \
protobuf-compiler \
git \
cmake \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
cmake

# setup rust.
RUN curl https://sh.rustup.rs -sSf | bash -s -- --default-toolchain ${RUST_TOOLCHAIN} -y
Expand All @@ -48,17 +47,16 @@ RUN cp /opt/tabby/bin/tabby /opt/tabby/bin/tabby-cpu

FROM ${BASE_CUDA_RUN_CONTAINER} AS runtime

RUN apt-get update && \
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt/lists,sharing=locked \
apt-get update && \
apt-get install -y --no-install-recommends \
git \
curl \
unzip \
openssh-client \
ca-certificates \
libgomp1 \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
libgomp1

# Install katana
RUN curl -L https://github.com/projectdiscovery/katana/releases/download/v1.1.2/katana_1.1.2_linux_amd64.zip -o katana.zip \
Expand Down
45 changes: 22 additions & 23 deletions docker/Dockerfile.rocm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG UBUNTU_VERSION=22.04
# This needs to generally match the container host's environment.
ARG ROCM_VERSION=5.7.1
ARG ROCM_VERSION=6.1.2
# Target the ROCM build image
ARG BASE_ROCM_DEV_CONTAINER=rocm/dev-ubuntu-${UBUNTU_VERSION}:${ROCM_VERSION}-complete
# Target the ROCM runtime image
Expand All @@ -12,17 +12,16 @@ FROM ${BASE_ROCM_DEV_CONTAINER} AS build
ARG RUST_TOOLCHAIN=stable

ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt/lists,sharing=locked \
apt-get update && \
apt-get install -y --no-install-recommends \
curl \
pkg-config \
libssl-dev \
protobuf-compiler \
git \
cmake \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
curl \
pkg-config \
libssl-dev \
protobuf-compiler \
git \
cmake

# setup rust.
RUN curl https://sh.rustup.rs -sSf | bash -s -- --default-toolchain ${RUST_TOOLCHAIN} -y
Expand All @@ -38,6 +37,7 @@ COPY . .

RUN --mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=/root/workspace/target \
find target/release/build -maxdepth 1 -type d -name 'llama-cpp-server-*' -prune -exec rm -rf {} + || true && \
cargo build --no-default-features --features rocm,prod --release --package tabby && \
cp target/release/llama-server /opt/tabby/bin/ && \
cp target/release/tabby /opt/tabby/bin/
Expand All @@ -47,19 +47,18 @@ RUN cp /opt/tabby/bin/tabby /opt/tabby/bin/tabby-cpu

FROM ${BASE_ROCM_RUN_CONTAINER} AS runtime

RUN apt-get update && \
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt/lists,sharing=locked \
apt-get update && \
apt-get install -y --no-install-recommends \
git \
curl \
openssh-client \
ca-certificates \
libssl3 \
rocblas \
hipblas \
libgomp1 \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
git \
curl \
openssh-client \
ca-certificates \
libssl3 \
rocblas \
hipblas \
libgomp1

# Disable safe directory in docker
# Context: https://github.com/git/git/commit/8959555cee7ec045958f9b6dd62e541affb7e7d9
Expand Down