feat: Add new Dockerfile and instructions#16
Draft
s2t2 wants to merge 2 commits intocopybara_pushfrom
Draft
Conversation
This commit introduces a new Docker setup (`Dockerfile-2`) and a corresponding entrypoint script (`docker-entrypoint.sh`).
Key improvements in `Dockerfile-2`:
- Uses Ubuntu 22.04 as the base image.
- Streamlined Python 3.10 and Poetry installation.
- Installs protoc and ffmpeg system libraries.
- Copies only necessary files for dependency installation before running `poetry install`.
- Installs all extras, including dev and notebook dependencies.
- Compiles .proto files during the image build.
- Uses an entrypoint script to provide flexibility in running commands (jupyter, python, pytest, bash).
A new `INSTRUCTIONS.md` file provides detailed steps on how you can:
- Build the Docker image using `Dockerfile-2`.
- Run the Docker container for various purposes:
- Jupyter Notebooks
- Python scripts
- Pytest (all tests or specific ones)
- Bash shell access
- Includes notes on handling .proto files, dependencies, and permissions.
This new setup aims to be less bloated and more user-friendly than the previous Dockerfile.
This commit refactors the Docker setup to eliminate the need for the `docker-entrypoint.sh` script.
Changes include:
- Modified `Dockerfile-2`:
- Removed the `COPY` and `RUN chmod` commands for `docker-entrypoint.sh`.
- Changed the `ENTRYPOINT` to `["poetry", "run"]`. This ensures all commands are executed within the Poetry virtual environment.
- The default `CMD` remains to start a Jupyter notebook server.
- Deleted `docker-entrypoint.sh` as it is no longer used.
- Updated `INSTRUCTIONS.md`:
- Revised `docker run` command examples to reflect the new `ENTRYPOINT`. Commands like `python`, `pytest`, `bash` are now directly appended to `docker run ... your-image-name <command>`.
- Clarified that the `ENTRYPOINT` handles running commands within the Poetry environment.
This simplification makes the Docker usage more direct by leveraging Poetry's run command as the entrypoint.
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.
This commit introduces a new Docker setup (
Dockerfile-2) and a corresponding entrypoint script (docker-entrypoint.sh).Key improvements in
Dockerfile-2:poetry install.A new
INSTRUCTIONS.mdfile provides detailed steps on how you can:Dockerfile-2.This new setup aims to be less bloated and more user-friendly than the previous Dockerfile.
Fixes #<issue_number_goes_here>