File size: 741 Bytes
0d99179
 
 
 
 
 
97ac1eb
0d99179
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM continuumio/miniconda3

WORKDIR /code

# Create the environment:
COPY ./environment.yml /code/environment.yml
COPY ./requirements.txt /code/requirements.txt

RUN conda config --set channel_priority strict
RUN conda config --add channels conda-forge
RUN conda env create -f environment.yml

# Make RUN commands use the new environment:
SHELL ["conda", "run", "-n", "env", "/bin/bash", "-c"]

RUN pip install -r requirements.txt

# Demonstrate the environment is activated:
RUN echo "Making sure installation worked:"
RUN python -c "import gradio, pypdf, pdf2image, langchain, openai, datasets"

COPY . .

# The code to run when container is started:

ENTRYPOINT ["conda", "run", "--no-capture-output", "-n", "env", "python", "app.py"]