newcooler / dockerfile
maahi2412's picture
Update dockerfile
40d7302 verified
raw
history blame contribute delete
999 Bytes
# FROM python:3.9-slim
# RUN apt-get update && apt-get install -y \
# libpng-dev \
# libjpeg-dev \
# zlib1g-dev \
# tesseract-ocr \
# libtesseract-dev \
# && rm -rf /var/lib/apt/lists/*
# RUN useradd -m -u 1000 user
# USER user
# ENV PATH="/home/user/.local/bin:$PATH"
# WORKDIR /app
# COPY --chown=user:user requirements.txt requirements.txt
# RUN pip install --no-cache-dir --upgrade pip && \
# pip install --no-cache-dir -r requirements.txt
# COPY --chown=user:user . /app
RUN pip install --no-cache-dir \
flask flask-cors pdfplumber pillow pytesseract numpy torch transformers scikit-learn gunicorn sentencepiece
RUN mkdir -p /app/uploads && chmod -R 777 /app/uploads
COPY fine_tuned_pegasus /app/fine_tuned_pegasus
COPY fine_tuned_bert /app/fine_tuned_bert
COPY fine_tuned_legalbert /app/fine_tuned_legalbert
# EXPOSE 7860
# # Increase timeout and reduce workers
# CMD ["gunicorn", "--workers", "1", "--timeout", "600", "--bind", "0.0.0.0:7860", "app:app"]