Skip to content

Commit

Permalink
Add Rust toolchain and download mpnet-base-v2.zip model
Browse files Browse the repository at this point in the history
  • Loading branch information
dartpain committed Feb 23, 2024
1 parent 007cd6c commit 2b644db
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions application/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@ FROM python:3.11-slim-bullseye as builder

# Tiktoken requires Rust toolchain, so build it in a separate stage
RUN apt-get update && apt-get install -y gcc curl
RUN wget https://d3dg1063dc54p9.cloudfront.net/models/embeddings/mpnet-base-v2.zip
RUN unzip mpnet-base-v2.zip -d model
RUN rm mpnet-base-v2.zip
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y && apt-get install --reinstall libc6-dev -y
ENV PATH="/root/.cargo/bin:${PATH}"
RUN pip install --upgrade pip && pip install tiktoken==0.5.2
COPY requirements.txt .
RUN pip install -r requirements.txt
RUN apt-get install -y wget unzip
RUN wget https://d3dg1063dc54p9.cloudfront.net/models/embeddings/mpnet-base-v2.zip
RUN unzip mpnet-base-v2.zip -d model
RUN rm mpnet-base-v2.zip


FROM python:3.11-slim-bullseye

Expand Down

0 comments on commit 2b644db

Please sign in to comment.