update Dockerfile.rust
parent
135a54b43c
commit
3788710882
|
|
@ -5,6 +5,7 @@ on:
|
||||||
push:
|
push:
|
||||||
branches: [ "main" ]
|
branches: [ "main" ]
|
||||||
paths:
|
paths:
|
||||||
|
- 'Dockerfile.rust'
|
||||||
- '.github/workflows/docker.rust.yml'
|
- '.github/workflows/docker.rust.yml'
|
||||||
- 'crates/**'
|
- 'crates/**'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,16 +46,16 @@ ENV PATH="/root/.cargo/bin:${PATH}"
|
||||||
COPY crates crates
|
COPY crates crates
|
||||||
|
|
||||||
WORKDIR /root/crates/tabby
|
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 mkdir -p /opt/tabby/bin
|
||||||
RUN cp target/release/tabby /opt/tabby/bin/
|
|
||||||
|
|
||||||
RUN mkdir -p /opt/tabby/lib
|
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
|
FROM nvidia/cuda:11.2.2-base-ubuntu20.04
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue