-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
I am trying to integrate this great program into my Spring Boot project. The app runs smoothly on my local device, but when I deploy my app to a Docker container, the tag extractor function seems to be not working. It only logs "Loading Word Segmentation Model," and I cannot receive any keywords.
I've put the models and jar library as the same structures in my project, and it still didn't work. I've tried to install the library in different ways, but with no results.
My Dockerfile:
FROM maven:3.8.3-openjdk-17 as BUILD
WORKDIR /digital-library
COPY src/ ./src
COPY pom.xml ./
COPY models/ ./models
COPY jdf.jar ./
COPY VnCoreNLP-1.2.jar ./
RUN mvn -f /digital-library/pom.xml -B -DskipTests clean install
FROM openjdk:17-jdk
WORKDIR /app
ARG JAR_FILE_NAME=digital-library-0.0.1-SNAPSHOT.jar
COPY --from=BUILD /digital-library/target/${JAR_FILE_NAME} ./app.jar
COPY --from=BUILD /digital-library/src/main/resources ./src/main/resources
COPY --from=BUILD /digital-library/jdf.jar ./
COPY --from=BUILD /digital-library/VnCoreNLP-1.2.jar ./
EXPOSE 8080
CMD ["sh", "-c", "java -Dspring.profiles.active=${SPRING_PROFILES_ACTIVE} -jar /app/app.jar"]
My dependency declaration:
<dependency>
<groupId>jdf</groupId>
<artifactId>jdf</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/jdf.jar</systemPath>
</dependency>
<dependency>
<groupId>vnpipeline</groupId>
<artifactId>vnpipeline</artifactId>
<version>1.2.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/VnCoreNLP-1.2.jar</systemPath>
</dependency>
Metadata
Metadata
Assignees
Labels
No labels