Skip to content

Commit 700f4d2

Browse files
committed
Copy resource into rpm, deb and image
1 parent 40f512c commit 700f4d2

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

.github/workflows/tests.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767

6868
- name: Install pysdk
6969
if: ${{ !cancelled() && !failure() }}
70-
run: sudo docker exec infinity_build bash -c "cd /infinity/ && pip uninstall -y infinity-sdk && pip install . -v --config-settings=cmake.build-type='Debug' --config-settings=build-dir='cmake-build-debug'"
70+
run: sudo docker exec infinity_build bash -c "cd /infinity/ && pip uninstall -y infinity-sdk && pip install . -v --config-settings=cmake.build-type='Debug' --config-settings=build-dir='cmake-build-debug' --config-settings=cmake.targets='embedded_infinity_ext'"
7171

7272
- name: Start infinity pysdk & http_api debug version
7373
if: ${{ !cancelled() && !failure() }}
@@ -165,7 +165,7 @@ jobs:
165165

166166
- name: Install pysdk
167167
if: ${{ !cancelled() && !failure() }}
168-
run: sudo docker exec infinity_build bash -c "cd /infinity/ && pip uninstall -y infinity-sdk && pip install . -v --config-settings=cmake.build-type='RelWithDebInfo' --config-settings=build-dir='cmake-build-release'"
168+
run: sudo docker exec infinity_build bash -c "cd /infinity/ && pip uninstall -y infinity-sdk && pip install . -v --config-settings=cmake.build-type='RelWithDebInfo' --config-settings=build-dir='cmake-build-release' --config-settings=cmake.targets='embedded_infinity_ext'"
169169

170170
- name: pysdk local infinity test release version
171171
if: ${{ !cancelled() && !failure() }}

CMakeLists.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,8 @@ set(CMAKE_INSTALL_PREFIX /usr)
195195
install(TARGETS infinity DESTINATION bin)
196196
install(FILES conf/infinity.service DESTINATION lib/systemd/system)
197197
install(FILES conf/infinity_conf.toml DESTINATION etc)
198-
#install(DIRECTORY ../resource/jieba DESTINATION ../var/infinity/resource)
198+
install(DIRECTORY resource/jieba DESTINATION ../var/infinity/resource)
199+
install(DIRECTORY resource/mecab DESTINATION ../var/infinity/resource)
199200

200201
# https://cmake.org/cmake/help/latest/cpack_gen/rpm.html
201202
# Specify the post-install script for RPM

scripts/Dockerfile_infinity

+7-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,10 @@ FROM debian:stable-slim
22

33
COPY cmake-build-release/src/infinity /usr/bin
44

5-
ENTRYPOINT [ "/usr/bin/infinity" ]
5+
# https://docs.docker.com/reference/dockerfile/#copy
6+
# If <src> is a directory, the entire contents of the directory are copied, including filesystem metadata.
7+
# The directory itself isn't copied, only its contents.
8+
COPY resource/jieba /resource/jieba
9+
COPY resource/mecab /resource/mecab
10+
11+
ENTRYPOINT ["bash", "-c", "cp -rf /resource /var/infinity/; exec /usr/bin/infinity"]

0 commit comments

Comments
 (0)