2021-09-11 07:39:16 +08:00
|
|
|
# basic setup
|
2023-09-16 18:57:57 +08:00
|
|
|
FROM python:3.10
|
2021-09-11 07:39:16 +08:00
|
|
|
RUN apt-get update && apt-get -y update
|
2021-12-17 09:11:33 +08:00
|
|
|
RUN apt-get install -y sudo git npm
|
2021-09-11 07:39:16 +08:00
|
|
|
|
|
|
|
# Setup user to not run as root
|
2023-09-16 18:57:57 +08:00
|
|
|
RUN adduser --disabled-password --gecos '' autogen-dev
|
|
|
|
RUN adduser autogen-dev sudo
|
2021-09-11 07:39:16 +08:00
|
|
|
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
2023-09-16 18:57:57 +08:00
|
|
|
USER autogen-dev
|
2021-09-11 07:39:16 +08:00
|
|
|
|
|
|
|
# Pull repo
|
2023-09-16 18:57:57 +08:00
|
|
|
RUN cd /home/autogen-dev && git clone https://github.com/microsoft/autogen.git
|
|
|
|
WORKDIR /home/autogen-dev/autogen
|
2021-09-11 07:39:16 +08:00
|
|
|
|
2023-09-16 18:57:57 +08:00
|
|
|
# Install autogen (Note: extra components can be installed if needed)
|
|
|
|
RUN sudo pip install -e .[test]
|
2021-09-11 07:39:16 +08:00
|
|
|
|
|
|
|
# Install precommit hooks
|
|
|
|
RUN pre-commit install
|
|
|
|
|
2021-12-17 09:11:33 +08:00
|
|
|
# For docs
|
2022-09-08 01:37:00 +08:00
|
|
|
RUN sudo npm install --global yarn
|
|
|
|
RUN sudo pip install pydoc-markdown
|
2021-12-17 09:11:33 +08:00
|
|
|
RUN cd website
|
2022-07-22 02:48:21 +08:00
|
|
|
RUN yarn install --frozen-lockfile --ignore-engines
|
2021-12-17 09:11:33 +08:00
|
|
|
|
2021-09-11 07:39:16 +08:00
|
|
|
# override default image starting point
|
|
|
|
CMD /bin/bash
|
2021-11-03 03:24:43 +08:00
|
|
|
ENTRYPOINT []
|