Spaces:
Runtime error
Runtime error
File size: 1,493 Bytes
360d784 0d5e9a2 f76965a 0d5e9a2 4bec2e6 0d5e9a2 360d784 993a6a3 360d784 0490fa6 360d784 0490fa6 360d784 0490fa6 360d784 0490fa6 0d5e9a2 360d784 0490fa6 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# Use a base image with Python3.9 and Nodejs20 slim version
FROM nikolaik/python-nodejs:python3.9-nodejs20-slim as static
WORKDIR /app
RUN apt update &&\
apt install -y wget
RUN rm -rf static && \
wget -O dist.tar.gz https://public-frontend-1300249583.cos.ap-nanjing.myqcloud.com/test-hp-metagpt-web/dist-20240417204906.tar.gz &&\
tar xvzf dist.tar.gz && \
mv dist static && \
rm dist.tar.gz
FROM nikolaik/python-nodejs:python3.9-nodejs20-slim
USER root
# Install Debian software needed by MetaGPT and clean up in one RUN command to reduce image size
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 && rm -rf /var/lib/apt/lists/*
# Install Mermaid CLI globally
ENV CHROME_BIN="/usr/bin/chromium" \
PUPPETEER_CONFIG="/app/config/puppeteer-config.json"\
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD="true"
RUN npm install -g @mermaid-js/mermaid-cli &&\
npm cache clean --force
WORKDIR /app
# Install Python dependencies and install MetaGPT
COPY requirements.txt requirements.txt
RUN pip install --no-cache-dir -r requirements.txt && \
mkdir -p /app/logs && chmod 777 /app/logs && \
mkdir -p /app/workspace && chmod 777 /app/workspace && \
mkdir -p /app/storage && chmod 777 /app/storage
COPY . .
COPY --from=static /app/static /app/static
COPY config/template.yaml static/config.yaml
CMD ["python", "app.py"]
|