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

[Issue]: Error running Docker container on Mac M2 using Colima #2612

Closed
shrijayan opened this issue May 7, 2024 · 4 comments
Closed

[Issue]: Error running Docker container on Mac M2 using Colima #2612

shrijayan opened this issue May 7, 2024 · 4 comments

Comments

@shrijayan
Copy link

Describe the issue

I encountered an error while trying to run a Docker container on my Mac M2 using Colima. Here are the details:

python: can't open file '/home/autogen/autogen/myapp/main.py': [Errno 2] No such file or directory

Expected Behavior:
The Docker container should run the Python script located at /home/autogen/autogen/myapp/main.py without any errors.

Actual Behavior:
The Docker container throws an error indicating that the file /home/autogen/autogen/myapp/main.py does not exist.

Steps to reproduce

  • Start Colima: colima start
  • Build Docker image: docker build -f .devcontainer/full/Dockerfile -t autogen_full_img https://github.com/microsoft/autogen.git#main
  • Run Docker container: sudo docker run -it -v 'myapp:/home/autogen/autogen/myapp' autogen_full_img:latest python /home/autogen/autogen/myapp/main.py

Screenshots and logs

image

Additional Information

Operating System: Mac M2
Docker Engine: 24.0.7
Colima Version: 0.6.8

@ekzhu
Copy link
Collaborator

ekzhu commented May 7, 2024

/home/autogen/autogen/myapp/main.py is just an example, you need to create the file.

@shrijayan
Copy link
Author

Step 1: Install Colima

brew install colima

Step 2: Install Docker

brew install docker
brew install docker-compose

Step 3: Clone AutoGen Repository

  • Clone the AutoGen repository to your local machine using the following command:
git clone https://github.com/microsoft/autogen.git

Navigate to the AutoGen project directory:

cd autogen

Step 4: Build Docker Images

  • Run the following command to build the autogen_full_img Docker image:
docker build -f .devcontainer/full/Dockerfile -t autogen_full_img https://github.com/microsoft/autogen.git#main

Step 5: Run AutoGen Applications from Docker Image

  • Run your application within the Docker container. For example:
docker run -it -v $(pwd)/myapp:/home/autogen/autogen/myapp autogen_base_img:latest python /home/autogen/autogen/myapp/main.py

Error

image

@ekzhu
Copy link
Collaborator

ekzhu commented May 9, 2024

Thanks for the step-by-step, however in step 5, it says:

Run your application within the Docker container. For example:

So this is an example, the file is not in the repo -- you need to create it.

@shrijayan
Copy link
Author

Thanks for the step-by-step, however in step 5, it says:

Run your application within the Docker container. For example:

So this is an example, the file is not in the repo -- you need to create it.

This Works

Issue Solved when I tried to use the command

docker run -v `pwd`/multiagent:/multiagent autogen_full_img python /multiagent/testing.py

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

No branches or pull requests

2 participants