mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2026-01-04 14:54:32 +01:00
* Improve docker setup & config * fix(browsing): Selenium needs access to home directory * fix(docker): allow overriding memory backend settings * simplify Dockerfile and docker-compose config * add .dockerignore * adjust Docker CI with release build type arg * replace Chrome by Chromium in devcontainer * update docs * update bulletin * use preinstalled chromedriver in web_selenium.py * update installation.md * fix code blocks for mkdocs * fix links to docs
34 lines
899 B
Docker
34 lines
899 B
Docker
# Use an official Python base image from the Docker Hub
|
|
FROM python:3.10-slim
|
|
|
|
# 'dev' or 'release' container build
|
|
ARG BUILD_TYPE=dev
|
|
|
|
# Install browsers
|
|
RUN apt-get update && apt-get install -y \
|
|
chromium-driver firefox-esr \
|
|
ca-certificates
|
|
|
|
# Install utilities
|
|
RUN apt-get install -y curl jq wget git
|
|
|
|
# Set environment variables
|
|
ENV PIP_NO_CACHE_DIR=yes \
|
|
PYTHONUNBUFFERED=1 \
|
|
PYTHONDONTWRITEBYTECODE=1
|
|
|
|
# Install the required python packages globally
|
|
ENV PATH="$PATH:/root/.local/bin"
|
|
COPY requirements.txt .
|
|
|
|
# Only install dev dependencies in dev container builds
|
|
RUN [ '${BUILD_TYPE}' = 'dev' ] || sed -i '/Items below this point will not be included in the Docker Image/,$d' requirements.txt && \
|
|
pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy the application files
|
|
WORKDIR /app
|
|
COPY autogpt/ ./autogpt
|
|
|
|
# Set the entrypoint
|
|
ENTRYPOINT ["python", "-m", "autogpt"]
|