Spaces:
Runtime error
Runtime error
| # dockerfile from miniconda image copy local requirements.yaml and install | |
| FROM continuumio/miniconda3:23.3.1-0 | |
| # set working directory | |
| WORKDIR /code | |
| # export port 50806 for shiny development | |
| EXPOSE 50806 | |
| # work as user, home folder, create bashrc | |
| SHELL ["/bin/bash", "-c"] | |
| # install mamba | |
| COPY env.yaml env.yaml | |
| RUN conda install -c conda-forge mamba | |
| RUN mamba env update -n base -f env.yaml | |
| # use bash as default for the rest of the build | |
| # install quarto cli (https://quarto.org/docs/download/tarball.html) | |
| # select appropriate version for arch | |
| RUN if [ "$(uname -m)" = "x86_64" ]; then \ | |
| wget https://github.com/quarto-dev/quarto-cli/releases/download/v1.3.450/quarto-1.3.450-linux-amd64.tar.gz \ | |
| && tar -C /opt -xvzf quarto-1.3.450-linux-amd64.tar.gz; \ | |
| else \ | |
| wget https://github.com/quarto-dev/quarto-cli/releases/download/v1.3.450/quarto-1.3.450-linux-arm64.tar.gz \ | |
| && tar -C /opt -xvzf quarto-1.3.450-linux-arm64.tar.gz; \ | |
| fi | |
| # create symlink and add location to path | |
| RUN ln -s /opt/quarto-1.3.450/bin/quarto /bin/quarto | |
| # # # check installation | |
| RUN quarto check | |
| # install pip requirements | |
| COPY requirements.txt requirements.txt | |
| RUN pip install -r requirements.txt | |
| # copy all other files | |
| COPY app.py app.py | |
| COPY data data | |
| COPY models.py models.py | |
| COPY utils.py utils.py | |
| EXPOSE 7860 | |
| CMD ["shiny", "run", "app.py", "--host", "0.0.0.0", "--port", "7860"] |