|
|
|
FROM python:3.9 |
|
|
|
|
|
WORKDIR /app |
|
|
|
|
|
COPY environment.yml /app/environment.yml |
|
COPY . /app |
|
|
|
|
|
RUN apt-get update && \ |
|
apt-get install -y curl && \ |
|
curl -sSLo /tmp/miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \ |
|
bash /tmp/miniconda.sh -b -p /opt/conda && \ |
|
rm /tmp/miniconda.sh && \ |
|
/opt/conda/bin/conda env create -f /app/environment.yml |
|
|
|
|
|
SHELL ["conda", "run", "-n", "opera", "/bin/bash", "-c"] |
|
|
|
|
|
RUN apt-get install -y nodejs npm && \ |
|
npm install -g n && \ |
|
n latest && \ |
|
export GRADIO_NODE_PATH=$(which node) |
|
|
|
|
|
EXPOSE 7860 |
|
|
|
|
|
CMD ["conda", "run", "-n", "opera", "streamlit", "run", "app.py", "--server.port=7860"] |
|
|