MetaGPT/Dockerfile

35 lines
1.2 KiB
Text
Raw Normal View History

2023-07-10 16:54:17 +08:00
# This Dockerfile is friendly to users in Chinese Mainland :)
# For users outside mainland China, feel free to modify or delete them :)
# Use a base image with Python 3.9.17 slim version (Bullseye)
2023-07-07 13:03:35 +08:00
FROM python:3.9.17-slim-bullseye
2023-07-10 16:54:17 +08:00
# Install Debian software needed by MetaGPT
2023-07-07 13:03:35 +08:00
RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list &&\
2023-07-10 16:54:17 +08:00
apt update &&\
2023-07-07 13:03:35 +08:00
apt install -y git curl wget build-essential gcc clang g++ make &&\
curl -sL https://deb.nodesource.com/setup_19.x | bash - &&\
2023-07-10 16:54:17 +08:00
apt install -y nodejs &&\
apt-get clean
2023-07-07 13:03:35 +08:00
2023-07-10 16:54:17 +08:00
# Set the working directory to /app
2023-07-07 13:03:35 +08:00
WORKDIR /app
2023-07-10 16:54:17 +08:00
# Install Mermaid CLI globally and clone the MetaGPT repository
2023-07-09 18:06:36 +08:00
RUN npm config set registry https://registry.npm.taobao.org &&\
npm install -g @mermaid-js/mermaid-cli &&\
2023-07-10 16:54:17 +08:00
npm cache clean --force &&\
2023-07-07 13:03:35 +08:00
git clone https://github.com/geekan/metagpt
2023-07-10 16:54:17 +08:00
# Install Python dependencies and install MetaGPT
2023-07-07 13:03:35 +08:00
RUN cd metagpt &&\
mkdir workspace &&\
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/ &&\
2023-07-10 16:54:17 +08:00
pip install -r requirements.txt &&\
pip cache purge &&\
2023-07-07 13:03:35 +08:00
python setup.py install
2023-07-10 16:54:17 +08:00
# Running with an infinite loop using the tail command
CMD ["sh", "-c", "tail -f /dev/null"]
2023-07-09 18:06:36 +08:00