MetaGPT/Dockerfile

27 lines
852 B
Text
Raw Normal View History

2023-07-19 11:20:18 +08:00
# Use a base image with Python3.9 and Nodejs20 slim version
2023-07-18 20:00:34 +12:00
FROM nikolaik/python-nodejs:python3.9-nodejs20-slim
2023-07-07 13:03:35 +08:00
2023-07-10 16:54:17 +08:00
# Install Debian software needed by MetaGPT
2023-07-18 20:00:34 +12:00
RUN apt update &&\
apt install -y git chromium fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 --no-install-recommends &&\
apt clean
2023-07-07 13:03:35 +08:00
2023-07-18 23:35:38 +12:00
# Install Mermaid CLI globally
2023-07-19 11:20:18 +08:00
ENV CHROME_BIN="/usr/bin/chromium" \
AM_I_IN_A_DOCKER_CONTAINER="true"
2023-07-18 20:00:34 +12:00
RUN npm install -g @mermaid-js/mermaid-cli &&\
npm cache clean --force
2023-07-10 16:54:17 +08:00
# Install Python dependencies and install MetaGPT
2023-07-19 11:20:18 +08:00
COPY . /app/metagpt
RUN cd /app/metagpt &&\
2023-07-07 13:03:35 +08:00
mkdir workspace &&\
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
WORKDIR /app/metagpt
2023-07-09 18:06:36 +08:00
# Running with an infinite loop using the tail command
2023-07-18 23:35:38 +12:00
CMD ["sh", "-c", "tail -f /dev/null"]