ad-mod / Dockerfile
venishpatidar's picture
Upload 7 files
be663b5 verified
FROM mcr.microsoft.com/devcontainers/javascript-node:0-18-bullseye
RUN apt-get update && apt-get install -y \
chromium chromium-driver \
fonts-liberation libappindicator3-1 \
libasound2 libatk-bridge2.0-0 libatk1.0-0 libcups2 libdbus-1-3 \
libgdk-pixbuf2.0-0 libnspr4 libnss3 libx11-xcb1 libxcomposite1 \
libxdamage1 libxrandr2 xdg-utils libu2f-udev libvulkan1 \
libxcb-dri3-0 libxshmfence1 libxss1 libgbm1 \
python3 python3-pip \
--no-install-recommends && \
apt-get clean && rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /workspace
# Copy package files and install
COPY package*.json ./
RUN npm install
# Copy Python app and install Python deps
COPY requirements.txt .
RUN pip install -r requirements.txt
# Copy rest of the files
COPY . .
# Make Chromium usable by Puppeteer
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
# Hugging Face exposes port 7860 or 3000
EXPOSE 7860
# Run both wa-automate and FastAPI
CMD uvicorn app:app --host 0.0.0.0 --port 7860