File size: 1,262 Bytes
ce00289 5497a6d ce00289 |
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 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
FROM nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04
RUN apt-get update && apt-get install -y \
wget \
git \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user
RUN wget -P /tmp \
"https://github.com/conda-forge/miniforge/releases/download/23.11.0-0/Mambaforge-23.11.0-0-Linux-x86_64.sh" \
&& bash /tmp/Mambaforge-23.11.0-0-Linux-x86_64.sh -b -p $HOME/mambaforge3 \
&& rm /tmp/Mambaforge-23.11.0-0-Linux-x86_64.sh
ENV PATH $HOME/mambaforge3/bin:$PATH
WORKDIR $HOME
ENV REPO=$HOME/llm-transparency-tool
COPY --chown=user . $REPO
WORKDIR $REPO
RUN mamba env create --name llmtt -f env.yaml -y
ENV PATH $HOME/mambaforge3/envs/llmtt/bin:$PATH
RUN pip install --upgrade pip
RUN pip install -e .
RUN cd llm_transparency_tool/components/frontend \
&& yarn install \
&& yarn build
EXPOSE 7860
CMD ["streamlit", "run", "llm_transparency_tool/server/app.py", "--server.port=7860", "--server.address=0.0.0.0", "--theme.font=Inconsolata", "--", "config/docker_hosting.json"]
|