Skip to content

Commit

Permalink
Merge pull request #63 from tigergraph/docker_fixes
Browse files Browse the repository at this point in the history
Fixing the dockerfile
  • Loading branch information
parkererickson-tg committed Mar 15, 2024
2 parents 06963fb + 8925aa3 commit 83f9e4a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand All @@ -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"
Expand Down
19 changes: 10 additions & 9 deletions Dockerfile.tests
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
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

#
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
Expand Down

0 comments on commit 83f9e4a

Please sign in to comment.