Skip to content

Commit

Permalink
feat: rewrite Dockerfile.r4userembeddingwithmodel Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu committed Oct 16, 2024
1 parent 4245b2b commit 1c6ba5f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
11 changes: 8 additions & 3 deletions Dockerfile.r4userembeddingwithmodel
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM ubuntu:jammy As builder

# RUN apk add openssl-dev musl-dev g++

RUN mkdir -p /userembedding && \
RUN mkdir -p /userembedding/model && \
apt update && \
apt install curl -y && \
curl https://sh.rustup.rs -sSf | bash -s -- -y && \
Expand All @@ -27,10 +27,15 @@ ENV MODEL_INTERNET="false"


WORKDIR /userembedding
RUN mkdir -p /userembedding/model

# Copy our build
COPY --from=builder /root/.cache/huggingface /root/.cache/huggingface
COPY --from=builder /userembedding/model /userembedding/model
COPY --from=builder /userembedding/target/release/userembedding ./
COPY --from=builder /userembedding/target/release/downloadmodel ./
COPY --from=builder /userembedding/target/release/buildmodelfromlocal ./


CMD ["/userembedding/userembedding"]

CMD ["/userembedding/userembedding"]
# ENTRYPOINT ["tail", "-f", "/dev/null"]
6 changes: 4 additions & 2 deletions Dockerfile.r4userembeddingwithmodeltest
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM ubuntu:jammy As builder

# RUN apk add openssl-dev musl-dev g++

RUN mkdir -p /userembedding && \
RUN mkdir -p /userembedding/model && \
apt update && \
apt install curl -y && \
curl https://sh.rustup.rs -sSf | bash -s -- -y && \
Expand All @@ -27,13 +27,15 @@ ENV MODEL_INTERNET="false"


WORKDIR /userembedding
RUN mkdir -p /userembedding/model

# Copy our build
COPY --from=builder /root/.cache/huggingface /root/.cache/huggingface
COPY --from=builder /userembedding/model /userembedding/model
COPY --from=builder /userembedding/target/release/userembedding ./
COPY --from=builder /userembedding/target/release/downloadmodel ./
COPY --from=builder /userembedding/target/release/buildmodelfromlocal ./



# CMD ["/userembedding/userembedding"]
ENTRYPOINT ["tail", "-f", "/dev/null"]

0 comments on commit 1c6ba5f

Please sign in to comment.