2024-01-15 11:15:59 -06:00
|
|
|
# Basic setup
|
2024-01-07 21:36:04 -05:00
|
|
|
FROM python:3.11-slim-bookworm
|
2024-01-15 11:15:59 -06:00
|
|
|
|
|
|
|
# Update and install necessary packages
|
2021-09-10 16:39:16 -07:00
|
|
|
RUN apt-get update && apt-get -y update
|
2024-01-15 11:15:59 -06:00
|
|
|
# added vim and nano for convenience
|
2024-01-30 17:54:44 -05:00
|
|
|
RUN apt-get install -y sudo git npm vim nano curl wget
|
2021-09-10 16:39:16 -07:00
|
|
|
|
2024-01-15 11:15:59 -06:00
|
|
|
# Setup a non-root user 'autogen' with sudo access
|
|
|
|
RUN adduser --disabled-password --gecos '' autogen
|
|
|
|
RUN adduser autogen sudo
|
2021-09-10 16:39:16 -07:00
|
|
|
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
2024-01-15 11:15:59 -06:00
|
|
|
USER autogen
|
|
|
|
WORKDIR /home/autogen
|
|
|
|
|
|
|
|
# Set environment variable
|
|
|
|
# ENV OPENAI_API_KEY="{OpenAI-API-Key}"
|
2021-09-10 16:39:16 -07:00
|
|
|
|
2024-01-15 11:15:59 -06:00
|
|
|
# Clone the AutoGen repository
|
|
|
|
RUN git clone https://github.com/microsoft/autogen.git /home/autogen/autogen
|
|
|
|
WORKDIR /home/autogen/autogen
|
2021-09-10 16:39:16 -07:00
|
|
|
|
2024-01-15 11:15:59 -06:00
|
|
|
# Install AutoGen in editable mode with extra components
|
2024-01-07 21:36:04 -05:00
|
|
|
RUN sudo pip install -e .[test,teachable,lmm,retrievechat,mathchat,blendsearch]
|
2021-09-10 16:39:16 -07:00
|
|
|
|
2024-01-15 11:15:59 -06:00
|
|
|
# Install pre-commit hooks
|
2021-09-10 16:39:16 -07:00
|
|
|
RUN pre-commit install
|
|
|
|
|
2024-01-15 11:15:59 -06:00
|
|
|
# Setup Docusaurus and Yarn for the documentation website
|
2022-09-07 13:37:00 -04:00
|
|
|
RUN sudo npm install --global yarn
|
|
|
|
RUN sudo pip install pydoc-markdown
|
2021-12-16 17:11:33 -08:00
|
|
|
RUN cd website
|
2022-07-21 14:48:21 -04:00
|
|
|
RUN yarn install --frozen-lockfile --ignore-engines
|
2021-12-16 17:11:33 -08:00
|
|
|
|
2024-01-30 17:54:44 -05:00
|
|
|
RUN arch=$(arch | sed s/aarch64/arm64/ | sed s/x86_64/amd64/) && \
|
|
|
|
wget -q https://github.com/quarto-dev/quarto-cli/releases/download/v1.4.549/quarto-1.4.549-linux-${arch}.tar.gz && \
|
|
|
|
mkdir -p /home/autogen/quarto/ && \
|
|
|
|
tar -xzf quarto-1.4.549-linux-${arch}.tar.gz --directory /home/autogen/quarto/ && \
|
|
|
|
rm quarto-1.4.549-linux-${arch}.tar.gz
|
|
|
|
|
|
|
|
ENV PATH="${PATH}:/home/autogen/quarto/quarto-1.4.549/bin/"
|
|
|
|
|
2024-01-15 11:15:59 -06:00
|
|
|
# Exposes the Yarn port for Docusaurus
|
|
|
|
EXPOSE 3000
|
|
|
|
|
|
|
|
# Pre-load popular Python packages
|
2024-01-07 21:36:04 -05:00
|
|
|
RUN pip install numpy pandas matplotlib seaborn scikit-learn requests urllib3 nltk pillow pytest beautifulsoup4
|
|
|
|
|
2024-01-15 11:15:59 -06:00
|
|
|
# Set the default command to bash
|
|
|
|
CMD ["/bin/bash"]
|