update Dockerfile.rust
parent
135a54b43c
commit
3788710882
|
|
@ -5,6 +5,7 @@ on:
|
|||
push:
|
||||
branches: [ "main" ]
|
||||
paths:
|
||||
- 'Dockerfile.rust'
|
||||
- '.github/workflows/docker.rust.yml'
|
||||
- 'crates/**'
|
||||
|
||||
|
|
|
|||
|
|
@ -46,16 +46,16 @@ ENV PATH="/root/.cargo/bin:${PATH}"
|
|||
COPY crates crates
|
||||
|
||||
WORKDIR /root/crates/tabby
|
||||
RUN mkdir -p target
|
||||
RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
||||
--mount=type=cache,target=/root/crates/tabby/target \
|
||||
cargo build --release
|
||||
|
||||
RUN mkdir -p /opt/tabby/bin
|
||||
RUN cp target/release/tabby /opt/tabby/bin/
|
||||
|
||||
RUN mkdir -p /opt/tabby/lib
|
||||
RUN cp $(dirname $(find target | grep lib/libctranslate2 | head -1))/libctranslate2* /opt/tabby/lib
|
||||
RUN mkdir -p target
|
||||
|
||||
RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
||||
--mount=type=cache,target=/root/crates/tabby/target \
|
||||
cargo build --release && \
|
||||
cp target/release/tabby /opt/tabby/bin/ && \
|
||||
cp $(dirname $(find target | grep lib/libctranslate2 | head -1))/libctranslate2* /opt/tabby/lib
|
||||
|
||||
FROM nvidia/cuda:11.2.2-base-ubuntu20.04
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue