2024-06-28 19:09:17 +03:00
|
|
|
FROM python:3.11.6-slim-bullseye
|
2023-06-01 17:01:27 +03:00
|
|
|
|
2024-09-02 11:20:53 +03:00
|
|
|
WORKDIR /app
|
2023-10-09 16:23:13 +03:00
|
|
|
|
2024-09-02 11:20:53 +03:00
|
|
|
# Install runtime dependencies
|
|
|
|
RUN apt-get update && apt-get install -y \
|
2023-08-25 12:05:24 +03:00
|
|
|
libgeos-dev \
|
2023-09-14 12:56:59 +03:00
|
|
|
libcurl4-openssl-dev \
|
|
|
|
libssl-dev \
|
2023-08-25 12:05:24 +03:00
|
|
|
binutils \
|
2023-11-18 21:23:56 +03:00
|
|
|
pandoc \
|
2023-08-25 12:05:24 +03:00
|
|
|
curl \
|
2023-09-14 12:56:59 +03:00
|
|
|
git \
|
2023-11-22 19:26:11 +03:00
|
|
|
poppler-utils \
|
|
|
|
tesseract-ocr \
|
2024-02-13 06:56:20 +03:00
|
|
|
libmagic-dev \
|
|
|
|
libreoffice \
|
2024-02-15 07:29:57 +03:00
|
|
|
libpq-dev \
|
|
|
|
gcc \
|
2024-09-02 11:20:53 +03:00
|
|
|
wget \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
2023-08-25 12:05:24 +03:00
|
|
|
|
2024-09-02 11:20:53 +03:00
|
|
|
# Install Supabase CLI
|
2024-04-27 14:42:24 +03:00
|
|
|
RUN ARCHITECTURE=$(uname -m) && \
|
|
|
|
if [ "$ARCHITECTURE" = "x86_64" ]; then \
|
|
|
|
wget https://github.com/supabase/cli/releases/download/v1.163.6/supabase_1.163.6_linux_amd64.deb && \
|
|
|
|
dpkg -i supabase_1.163.6_linux_amd64.deb && \
|
|
|
|
rm supabase_1.163.6_linux_amd64.deb; \
|
|
|
|
elif [ "$ARCHITECTURE" = "aarch64" ]; then \
|
|
|
|
wget https://github.com/supabase/cli/releases/download/v1.163.6/supabase_1.163.6_linux_arm64.deb && \
|
|
|
|
dpkg -i supabase_1.163.6_linux_arm64.deb && \
|
|
|
|
rm supabase_1.163.6_linux_arm64.deb; \
|
2024-09-02 11:20:53 +03:00
|
|
|
fi
|
2024-06-27 14:02:15 +03:00
|
|
|
|
2024-09-02 11:20:53 +03:00
|
|
|
COPY . .
|
2024-06-27 15:02:10 +03:00
|
|
|
|
2024-09-02 11:20:53 +03:00
|
|
|
RUN PYTHONDONTWRITEBYTECODE=1 pip install --no-cache-dir -r requirements.lock
|
2023-05-21 02:20:55 +03:00
|
|
|
|
2024-09-02 11:20:53 +03:00
|
|
|
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')"
|
2024-06-26 10:58:55 +03:00
|
|
|
|
2023-11-13 12:13:56 +03:00
|
|
|
|
2024-09-02 11:20:53 +03:00
|
|
|
ENV PYTHONPATH=/app
|
2023-05-21 02:20:55 +03:00
|
|
|
|
2023-11-18 21:23:56 +03:00
|
|
|
EXPOSE 5050
|