RAG / Dockerfile
hetvaghasia39's picture
Update Dockerfile to use pip cache for faster installation
b7a96ac
raw
history blame
941 Bytes
FROM python:3.12.0
# RUN apt-get update && apt-get install -y \
# sqlite3 \
# libsqlite3-dev \
# && rm -rf /var/lib/apt/lists/*
COPY requirements.txt /app/requirements.txt
WORKDIR /app
RUN --mount=type=cache,target=/root/.cache/pip pip install -r requirements.txt
RUN playwright install-deps
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR /app
RUN playwright install
COPY --chown=user . $HOME/app
WORKDIR $HOME/app/pragetx_scraper
RUN scrapy crawl pages && \
cd $HOME/app && \
python setup.py
WORKDIR $HOME/app
RUN curl https://cdn-media.huggingface.co/frpc-gradio-0.2/frpc_linux_amd64 -o frpc_linux_amd64_v0.2
USER root
RUN mv frpc_linux_amd64_v0.2 /usr/local/lib/python3.12/site-packages/gradio/
RUN chmod +x /usr/local/lib/python3.12/site-packages/gradio/frpc_linux_amd64_v0.2
EXPOSE 7860
USER user
# CMD ["python", "main.py"]
CMD ["gradio", "main.py"]