| # FROM nvidia/cuda:12.0.0-cudnn8-devel-ubuntu22.04 | |
| FROM python:3.9 | |
| # FROM wallies/python-cuda:3.10-cuda11.6-runtime | |
| # FROM qts8n/cuda-python:9.1-runtime | |
| # FROM qts8n/cuda-python:runtime | |
| # RUN sudo apt-get remove --purge '^nvidia-.*' | |
| # RUN sudo apt-get remove --purge '^libnvidia-.*' | |
| # RUN sudo apt-get autoremove | |
| # RUN sudo apt-get update | |
| # RUN sudo apt-get upgrade | |
| # RUN sudo apt-get dist-upgrade | |
| # RUN sudo apt-get install nvidia-driver-545.92 | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH | |
| WORKDIR $HOME/app | |
| # RUN pip install --no-cache-dir --upgrade pip | |
| COPY --chown=user . $HOME/app | |
| COPY ./requirements.txt ~/app/requirements.txt | |
| # RUN apt-get install nvidia-driver-545.92 | |
| RUN pip install -r requirements.txt | |
| # RUN lspci | grep NVIDIA | |
| # RUN nvidia-smi | |
| # RUN pip install accelerate | |
| # RUN pip install -i https://test.pypi.org/simple/ bitsandbytes | |
| # RUN pip install --upgrade -i https://test.pypi.org/simple/ bitsandbytes | |
| COPY . . | |
| CMD ["chainlit", "run", "app.py", "--port", "7860"] | |