web-crawling / Dockerfile
pvanand's picture
Update Dockerfile
43545a2 verified
raw
history blame
1.27 kB
# Use the official Python 3.10.9 image as the base
FROM python:3.10.9
# Install system dependencies
# These are required for various Python packages and functionalities
# RUN apt-get update && apt-get install -y \
# libwoff1 \
# libopus0 \
# libwebp6 \
# libwebpdemux2 \
# libenchant1c2a \
# libgudev-1.0-0 \
# libsecret-1-0 \
# libhyphen0 \
# libgdk-pixbuf2.0-0 \
# libegl1 \
# libnotify4 \
# libxslt1.1 \
# libevent-2.1-7 \
# libgles2 \
# libvpx6 \
# libxcomposite1 \
# libatk1.0-0 \
# libatk-bridge2.0-0 \
# libepoxy0 \
# libgtk-3-0 \
# libharfbuzz-icu0 \
# && rm -rf /var/lib/apt/lists/*
# Set the working directory in the container
WORKDIR /app
# Copy the requirements file into the container
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir --upgrade -r requirements.txt
# Install Playwright browsers
RUN playwright install
# Copy the current directory contents into the container
COPY . .
# Ensure the correct permissions for the application directory
RUN chmod -R 755 /app
# Expose the port the app runs on
EXPOSE 8000
# Command to run the FastAPI application
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]