Skip to content
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

Split to more layers in docker image #61

Closed
pycui opened this issue Jul 15, 2023 · 1 comment · Fixed by #108
Closed

Split to more layers in docker image #61

pycui opened this issue Jul 15, 2023 · 1 comment · Fixed by #108
Labels
enhancement New feature or request

Comments

@pycui
Copy link
Collaborator

pycui commented Jul 15, 2023

This can speed up the build/push/deploy time.

@pycui pycui added the enhancement New feature or request label Jul 15, 2023
@Eliascm17
Copy link

Eliascm17 commented Jul 18, 2023

I think I may have found a fix to speed up development. I'm using docker volumes to do so.

  1. Build the Docker Image: The first step is to build the Docker image for the RealChar application. You can do this by running the following command: python cli.py docker-build
  2. Create a Docker Volume: Next, you'll need to create a Docker volume. This is a "shared folder" that will be accessible both from your host machine and from inside the Docker container. Any changes you make to the files in this volume on your host machine will be reflected inside the Docker container. You can create a Docker volume by running the following command: docker volume create realchar-volume
  3. Run the Docker Container: docker run -v realchar-volume:/RealChar -p 8000:8000 shaunly/real_char:latest

Note: when running step 3 I got this error:

Unable to find image 'shaunly/real_char:latest' locally
latest: Pulling from shaunly/real_char
docker: no matching manifest for linux/arm64/v8 in the manifest list entries.
See 'docker run --help'.   

I then built the image locally and it seemed to have fixed the error I got and now when I run docker run -v ... it works just fine

  • general command: docker build -t shaunly/real_char:latest .
  • if you need to run the platform specific build: docker build --platform linux/arm64/v8 -t shaunly/real_char:latest .

Boom: now you can containerize the project in a docker container and still have the speed of running the project on your machine as if it wasn't containerized :P

edit: I didn't take into account the dockerfile that already existed in the repo so this is the docker run command you should run: docker run -v <PATH TO DIR OR DOCKER VOLUME>:/realtime_ai_character -p 8000:8000 shaunly/real_char:latest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants