Lenith / Dockerfile
Tecnhotron
First
2e63948
raw
history blame contribute delete
812 Bytes
FROM python:3.13
RUN useradd -m -u 1000 user
# Install system dependencies
RUN apt-get update && apt-get install -y xvfb wget
# Install Google Chrome
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list \
&& apt-get update \
&& apt-get install -y google-chrome-stable
USER user
ENV PATH="/home/user/.local/bin:$PATH"
WORKDIR /app
COPY --chown=user ./requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
COPY --chown=user . /app
# Start Xvfb and run the application
CMD sh -c "Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & export DISPLAY=:99 && uvicorn api:app --host 0.0.0.0 --port 7860"