arif97's picture
Deployement
1981ec5
# We need python 3.12 exactly
FROM python:3.12-slim
#Below loc will give us lates or appropriate microsft build tools required to build wheels for some packages
RUN apt-get update --fix-missing && apt-get install -y --fix-missing build-essential
# The following line will create a code direcrory
WORKDIR /code
# The following line will copy the requirements into the code directory
COPY ./requirements.txt /code/requirements.txt
# Execution of the following line will result in all dependencies installation
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
COPY . .
# Below will execute and authorize write operations within huggingface
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app
COPY --chown=user . $HOME/app
# The followong line is a command to run our app
CMD streamlit run /code/streamlit_app.py --server.port=7860 --server.address=0.0.0.0 arif97-Retrieval-Augmented-Generation.hf.space