|
|
FROM nvidia/cuda:12.4.0-devel-ubuntu22.04 |
|
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive |
|
|
RUN apt-get update && \ |
|
|
apt-get install -y --no-install-recommends wget ca-certificates && \ |
|
|
wget -q https://developer.nvidia.com/downloads/assets/tools/secure/nsight-systems/2025_3/NsightSystems-linux-cli-public-2025.3.1.90-3582212.deb -O /tmp/nsys.deb && \ |
|
|
apt-get install -y /tmp/nsys.deb && \ |
|
|
rm -f /tmp/nsys.deb && \ |
|
|
apt-get install -y python3.11 python3.11-distutils python3.11-dev python3-pip && \ |
|
|
update-alternatives --install /usr/bin/python python /usr/bin/python3.11 1 && \ |
|
|
python -m pip install --upgrade pip && \ |
|
|
rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
RUN apt-get update && apt-get install -y gcc g++ build-essential && \ |
|
|
python -m pip install --no-cache-dir nuitka |
|
|
|
|
|
|
|
|
RUN useradd -m -u 1000 user |
|
|
USER user |
|
|
ENV PATH="/home/user/.local/bin:$PATH" |
|
|
|
|
|
WORKDIR /app |
|
|
|
|
|
|
|
|
COPY --chown=user requirements.txt . |
|
|
RUN pip install --no-cache-dir -r requirements.txt |
|
|
|
|
|
|
|
|
COPY --chown=user app.py . |
|
|
COPY --chown=user tool /app/tool |
|
|
RUN chown -R user:user /app |
|
|
|
|
|
|
|
|
EXPOSE 7860 |
|
|
|
|
|
|
|
|
CMD ["python", "app.py"] |
|
|
|