MetaGPT/Dockerfile

29 lines
952 B
Text
Raw Normal View History

2023-07-07 13:03:35 +08:00
FROM python:3.9.17-slim-bullseye
#Special gifts for mainland China users :)
#Change to your own preferenced mirrors if you wish, just uncomment them is fine too.
2023-07-09 18:06:36 +08:00
#Below is apt mirror setup.
2023-07-07 13:03:35 +08:00
RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list &&\
apt update &&\
apt install -y git curl wget build-essential gcc clang g++ make &&\
curl -sL https://deb.nodesource.com/setup_19.x | bash - &&\
apt install -y nodejs
WORKDIR /app
2023-07-09 18:06:36 +08:00
#This sets npm mirror url.
RUN npm config set registry https://registry.npm.taobao.org &&\
npm install -g @mermaid-js/mermaid-cli &&\
2023-07-07 13:03:35 +08:00
git clone https://github.com/geekan/metagpt
RUN cd metagpt &&\
mkdir workspace &&\
2023-07-09 18:06:36 +08:00
#This sets the pip mirror url.
2023-07-07 13:03:35 +08:00
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/ &&\
2023-07-09 17:13:59 +08:00
pip install -r requirements.txt --no-cache-dir &&\
2023-07-07 13:03:35 +08:00
python setup.py install
2023-07-09 17:13:59 +08:00
RUN pip cache purge &&\
apt autoclean
2023-07-09 18:06:36 +08:00