Skip to content

Instantly share code, notes, and snippets.

@ugovaretto
Created June 29, 2025 14:42
Show Gist options
  • Save ugovaretto/60699f097ce18554457346a9b77a1f8f to your computer and use it in GitHub Desktop.
Save ugovaretto/60699f097ce18554457346a9b77a1f8f to your computer and use it in GitHub Desktop.
Dockerfile for AI webscraping with crawl4AI and Playwright
# crawl4ai and playwright
FROM ubuntu:24.04
RUN apt-get update && apt-get install -y \
python3 \
python3-pip
WORKDIR /app
RUN apt install -y build-essential
RUN aot install -y git
RUN apt install -y curl
RUN apt install -y bash
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
RUN apt install -y npm
RUN npm install npx
RUN pip3 install "crawl4ai[all]" --break-system-packages
RUN crawl4ai-download-models
RUN pip3 install matplotlib --break-system-packages
RUN pip3 install jupyter --break-system-packages
RUN pip3 install nest_asyncio --break-system-packages
RUN playwright install
RUN playwright install-deps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment