|
FROM python:3.11-slim |
|
|
|
WORKDIR /app |
|
|
|
|
|
RUN apt-get update && apt-get install -y \ |
|
build-essential \ |
|
curl \ |
|
libcurl4-openssl-dev \ |
|
libssl-dev \ |
|
|
|
wget \ |
|
gnupg \ |
|
fonts-liberation \ |
|
libasound2 \ |
|
libatk-bridge2.0-0 \ |
|
libatk1.0-0 \ |
|
libatspi2.0-0 \ |
|
libcups2 \ |
|
libdbus-1-3 \ |
|
libdrm2 \ |
|
libgbm1 \ |
|
libgtk-3-0 \ |
|
libnspr4 \ |
|
libnss3 \ |
|
libxcomposite1 \ |
|
libxdamage1 \ |
|
libxfixes3 \ |
|
libxkbcommon0 \ |
|
libxrandr2 \ |
|
xdg-utils \ |
|
|
|
&& 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.list \ |
|
&& apt-get update \ |
|
&& apt-get install -y google-chrome-stable \ |
|
&& rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
COPY requirements.txt . |
|
RUN pip install --no-cache-dir -r requirements.txt |
|
|
|
|
|
COPY . . |
|
|
|
|
|
EXPOSE 7860 |
|
|
|
|
|
ENV OPENAI_API_KEY=None |
|
ENV ENVIRONMENT="production" |
|
ENV PORT=7860 |
|
|
|
|
|
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] |