Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Using program in docker container #2

Copy link
Copy link

Description

@vt0022
Issue body actions

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>
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.