Skip to content

Commit

Permalink
fix(rwkv.cpp): add build step for librwkv.so
Browse files Browse the repository at this point in the history
  • Loading branch information
LonghronShen authored and josStorer committed Mar 7, 2024
1 parent 050154f commit 8678f37
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,20 @@ RUN add-apt-repository -y ppa:deadsnakes/ppa && \
apt install -y g++-11 python3.10 python3.10-distutils python3.10-dev && \
curl -sS http://mirrors.aliyun.com/pypi/get-pip.py | python3.10

RUN python3.10 -m pip install cmake

FROM runtime AS librwkv

WORKDIR /app

RUN git clone https://github.com/RWKV/rwkv.cpp.git && \
cd rwkv.cpp && \
git submodule update --init --recursive && \
mkdir -p build && \
cd build && \
cmake -G Ninja .. && \
cmake --build .

FROM runtime AS final

WORKDIR /app
Expand All @@ -34,6 +48,7 @@ RUN python3.10 -m pip install --quiet -r ./backend-python/requirements.txt

COPY . .
COPY --from=frontend /app/frontend/dist /app/frontend/dist
COPY --from=librwkv /app/rwkv.cpp/build/librwkv.so /app/backend-python/rwkv_pip/cpp/librwkv.so

EXPOSE 27777

Expand Down

0 comments on commit 8678f37

Please sign in to comment.