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-08-09 23:26:12 +08:00
|
|
|
# Install Debian software needed by MetaGPT and clean up in one RUN command to reduce image size
|
2023-07-18 20:00:34 +12:00
|
|
|
RUN apt update &&\
|
2024-08-07 20:13:11 +08:00
|
|
|
apt install -y libgomp1 git chromium fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 --no-install-recommends file &&\
|
2023-08-09 23:26:12 +08:00
|
|
|
apt clean && rm -rf /var/lib/apt/lists/*
|
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" \
|
2024-01-31 23:13:38 +08:00
|
|
|
puppeteer_config="/app/metagpt/config/puppeteer-config.json"\
|
2023-08-03 09:16:17 +00:00
|
|
|
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD="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
|
2023-07-13 13:55:56 +08:00
|
|
|
WORKDIR /app/metagpt
|
2023-08-09 23:26:12 +08:00
|
|
|
RUN mkdir workspace &&\
|
|
|
|
|
pip install --no-cache-dir -r requirements.txt &&\
|
2023-12-20 00:58:56 +08:00
|
|
|
pip install -e .
|
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"]
|
2023-08-09 23:26:12 +08:00
|
|
|
|