Giter VIP home page Giter VIP logo

Comments (6)

geekan avatar geekan commented on May 17, 2024

@voidking

from metagpt.

voidking avatar voidking commented on May 17, 2024

@gnoejuan
I'm sorry I couldn't locate the problem according to your description.
I have a few suggestions that might help:

  1. Make sure your workdir in container is /app/metagpt which contains the MetaGPT codes, and exec python startup.py "something" in the /app/metagpt directory.
  2. Make sure the config directory is in workdir. The correct path like this: /app/metagpt/config/key.yaml. Then the program can find the config.
  3. Change the config content by mounting a file or sed in Dockerfile. Make sure the program can work by configfile.
  4. Give parameters through environment variables.

By the way, you can debug your container by the following step:

docker run --name test -d docker.io/library/metagpt:latest tail -f /dev/null
docker exec -it test /bin/sh
cat config/key.yaml
python startup.py "do something"
export OPENAI_API_KEY="xxx"
python startup.py "do something"
...

Then you can find where the problem is.

from metagpt.

gnoejuan avatar gnoejuan commented on May 17, 2024

Awesome! Thank you!

So, looks like with the command line I was running earlier, the mount was in the wrong place! Good catch!

But, before I figured out the mount issue, when I was testing the

export OPENAI_API_KEY="xxx"
python startup.py "do something"

step, I ran into the NotConfiguredException.

So, I'm happy and taken care of ( I can modify the Job to use the config ), the documentation in the Readme does suggest that an environment variable should also be a viable approach.

from metagpt.

geekan avatar geekan commented on May 17, 2024

I know the problem, because config.yaml has higher priority, so the stub in config.yaml blocks the env variable. I will fix this in the next update

from metagpt.

geekan avatar geekan commented on May 17, 2024

da11d38
pushed. check it again.

from metagpt.

gnoejuan avatar gnoejuan commented on May 17, 2024

Yup! That worked! The Job was able to complete using the environment variables!

from metagpt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.