Closed Noricks closed 1 year ago
@Noricks Thanks so much for your investigation. I think we should do both.
Please go ahead and create a PR to address this issue.
I dig a bit more. This seems specific to mcr.microsoft.com/vscode/devcontainers/java:11
docker image. I think we only need to install fontconfig
in Dockerfile
@Noricks Your GITHUB_TOKEN has been posted in this issue description. I have updated the description and removed it. Please make sure revoke the TOKEN on your side.
Description
Hi, when I try to build the repo using the provided Codespaces environment, the following two tests FAILED:
ai.djl.examples.inference.ObjectDetectionTest
ai.djl.tensorflow.integration.modality.cv.TfSsdTest
The problem originated from
java.desktop/sun.awt.X11FontManager
.It could be solved by adding the package
fontconfig
to the Codespaces Dockerfile or it can be skipped using TestRequirments.The problem may have some relationship with the OpenJDK Dockerfile problem: https://gitlab.alpinelinux.org/alpine/aports/-/issues/7372
I am more than happy to submit a pull request if this approach is acceptable.
Expected Behavior
The tests should PASS or SKIP.
Error Message
ai.djl.examples.inference.ObjectDetectionTest
With Command:
./gradlew :examples:test --tests "ai.djl.examples.inference.ObjectDetectionTest" --info
Error Message:
ai.djl.tensorflow.integration.modality.cv.TfSsdTest
With command:
./gradlew :engines:tensorflow:tensorflow-model-zoo:test --tests "ai.djl.tensorflow.integration.modality.cv.TfSsdTest" --info
Error Message:
How to Reproduce?
Environment
Open the repo in the Codespaces, which will use the Docker environment provided along with DJL repo.
It is worth noting that the 8GB memory might not be sufficient to execute some of the tests.
Steps to reproduce
Single Command
./gradlew build
Dedicated Commands
./gradlew :examples:test --tests "ai.djl.examples.inference.ObjectDetectionTest" --info
./gradlew :engines:tensorflow:tensorflow-model-zoo:test --tests "ai.djl.tensorflow.integration.modality.cv.TfSsdTest" --info
What have you tried to solve it?
Approaches that DO work
Approach 1: Install package
fontconfig
in the provided Dockerfile (.devcontainer/Dockerfile
)Approach 2: SKIP the tests using
TestRequirments
Add the following lines in the
TestRequirments
:Approaches that do not work
-Djava.awt.headless=true
unset DISPLAY
Environment Info