megafarce/Dockerfile
Russell Ballestrini c63cfe0de6 Boom. It works.
modified:   Dockerfile
	modified:   app.py
2024-12-08 17:43:00 -05:00

41 lines
966 B
Docker

# Dockerfile
FROM python:3.11.10-slim-bullseye
WORKDIR /app
# Install runtime dependencies
RUN apt-get update && apt-get upgrade -y && apt-get install -y \
libgeos-dev \
libcurl4-openssl-dev \
libssl-dev \
binutils \
curl \
git \
autoconf \
automake \
build-essential \
libtool \
python-dev \
wget \
gcc \
libmagic-dev \
poppler-utils \
tesseract-ocr \
libreoffice \
libpq-dev \
pandoc && \
rm -rf /var/lib/apt/lists/* && apt-get clean
COPY . .
RUN pip install --no-cache-dir -r requirements.lock
RUN playwright install --with-deps && \
python -c "from unstructured.nlp.tokenize import download_nltk_packages; download_nltk_packages()" && \
python -c "import nltk;nltk.download('punkt_tab'); nltk.download('averaged_perceptron_tagger_eng')" && \
python -c "from unstructured.partition.model_init import initialize; initialize()"
EXPOSE 8001
CMD ["python", "app.py"]