-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cli: fix docker run on linux #604
Conversation
langstream-cli/src/main/java/ai/langstream/cli/commands/BaseCmd.java
Outdated
Show resolved
Hide resolved
langstream-cli/src/main/java/ai/langstream/cli/commands/docker/LocalRunApplicationCmd.java
Show resolved
Hide resolved
This might be a better solution https://stackoverflow.com/a/57776923/7309769 |
.addShutdownHook( | ||
new Thread( | ||
() -> { | ||
log("Cleaning environment"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we log this only if there are "temporary files"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -45,6 +51,8 @@ public class LocalRunApplicationCmd extends BaseDockerCmd { | |||
|
|||
protected static final String LOCAL_DOCKER_RUN_PROFILE = "local-docker-run"; | |||
|
|||
private static final Set<Path> temporaryFiles = new HashSet<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use a Concurrent set, this structure is accessed from multiple thread
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Changes:
After these changes, I successfully setup an amazon linux machine to run langstream (I'll add it to the doc):