feat: Add Dockerfile and enable NLTK dependency#53
Open
ryan-steed-usa wants to merge 2 commits intopetermg:mainfrom
Open
feat: Add Dockerfile and enable NLTK dependency#53ryan-steed-usa wants to merge 2 commits intopetermg:mainfrom
ryan-steed-usa wants to merge 2 commits intopetermg:mainfrom
Conversation
- Added comprehensive Dockerfile to enable containerized deployment with proper user management, environment configuration, and dependency installation - Enabled CUDA library path configuration for proper GPU acceleration support - Uncommented and enabled punkt_tab NLTK tokenizer download to ensure proper text processing capabilities with 3.8.2+ - Configured Gradio server settings including port, host, analytics, and sharing options - Implemented proper file ownership and path management within the container - Added Python virtual environment setup and dependency installation from requirements.txt - Set up proper user switching for security best practices in containerized environment - Included system package installation for ffmpeg support
Author
|
Closes #55 |
- Replaced `addgroup --system --gid $GID app` with `groupadd --system --gid $GID app` to use the modern group management command - Replaced `adduser --system --no-create-home --uid $UID --gid $GID --home $USER_HOME app` with `useradd --system --uid $UID --gid $GID --home $USER_HOME app` to use the modern user management command - These changes update the Dockerfile to use POSIX-compliant alternatives that are more widely supported and maintain compatibility with current Linux distributions - The functionality remains identical but uses more standard and reliable system commands for creating system groups and users
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
NLTK reference: nltk/nltk#3293
Podman non-root example
I prefer to use rootless Podman with a non-root container user building like:
Run with persistent data:
Docker root example
I've also tested using root within a Ubuntu 24.04 VM (CPU only). To build:
Run: