2023-07-13 13:55:56 +08:00
|
|
|
# This Dockerfile is friendly to users in Chinese Mainland :)
|
2023-07-10 16:54:17 +08:00
|
|
|
# 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-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-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
|
|
|
|
2023-07-18 23:35:38 +12:00
|
|
|
# Install Mermaid CLI globally
|
2023-07-18 20:00:34 +12:00
|
|
|
ENV CHROME_BIN="/usr/bin/chromium"
|
|
|
|
|
ENV AM_I_IN_A_DOCKER_CONTAINER Yes
|
|
|
|
|
ADD puppeteer-config.json /puppeteer-config.json
|
|
|
|
|
RUN npm install -g @mermaid-js/mermaid-cli &&\
|
|
|
|
|
npm cache clean --force
|
|
|
|
|
|
|
|
|
|
# Copy src to container the MetaGPT repository
|
|
|
|
|
COPY . /app/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 &&\
|
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-13 13:55:56 +08:00
|
|
|
WORKDIR /app/metagpt
|
2023-07-09 18:06:36 +08:00
|
|
|
|
2023-07-13 13:55:56 +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"]
|