diff --git a/Dockerfile b/Dockerfile index da2b0431..a8629246 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ RUN apt install -y build-essential RUN conda create -n py39 python=3.9 pip RUN echo "conda activate py39" > ~/.bashrc -ENV PATH /opt/conda/envs/env/bin:$PATH +ENV PATH /opt/conda/envs/py39/bin:$PATH RUN conda run -n py39 \ conda install faiss-cpu -c pytorch # @@ -19,9 +19,10 @@ RUN /opt/conda/envs/py39/bin/pip install --no-cache-dir --upgrade -r /code/requi # COPY ./app /code/app +COPY ./configs /code/app/configs -ENV LLM_CONFIG="/llm_config.json" -ENV DB_CONFIG="/db_config.json" +ENV LLM_CONFIG="/code/app/configs/llm_config.json" +ENV DB_CONFIG="/code/app/configs/db_config.json" # INFO, DEBUG, DEBUG_PII ENV LOGLEVEL="INFO" diff --git a/Dockerfile.tests b/Dockerfile.tests index 21fae89c..ed70f141 100644 --- a/Dockerfile.tests +++ b/Dockerfile.tests @@ -1,13 +1,13 @@ FROM continuumio/miniconda3 -RUN apt-get update -RUN apt install -y build-essential - -RUN conda create -n py39 python=3.9 pip -RUN echo "conda activate py39" > ~/.bashrc -ENV PATH /opt/conda/envs/env/bin:$PATH -RUN conda run -n py39 \ - conda install faiss-cpu -c pytorch +RUN apt-get update && \ + apt-get install -y build-essential + +RUN conda create -n py39 python=3.9 pip -y && \ + conda init bash + +SHELL ["/bin/bash", "--login", "-c"] + # WORKDIR /code @@ -15,7 +15,8 @@ WORKDIR /code COPY ./requirements.txt /code/requirements.txt # -RUN /opt/conda/envs/py39/bin/pip install --no-cache-dir --upgrade -r /code/requirements.txt +RUN conda run -n py39 pip install --no-cache-dir --upgrade -r /code/requirements.txt && \ + conda run -n py39 conda install faiss-cpu -c pytorch -y # COPY ./app /code/app