Spaces:
Sleeping
Sleeping
FROM docker.io/nvidia/cuda:12.2.2-runtime-ubuntu22.04 | |
USER root | |
ENV MPLCONFIGDIR=/tmp/matplotlib \ | |
TRANSFORMERS_CACHE=/tmp/huggingface \ | |
HUGGINGFACE_HUB_CACHE=/tmp/huggingface \ | |
DEBIAN_FRONTEND=noninteractive | |
# Install system dependencies with correct OpenSSL 1.1 URL | |
RUN chmod 1777 /tmp \ | |
&& apt-get update -q \ | |
&& apt-get install -y --no-install-recommends \ | |
ca-certificates \ | |
wget \ | |
libgl1 \ | |
python3 \ | |
python3-pip \ | |
libglib2.0-0 \ | |
git \ | |
&& wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.19_amd64.deb \ | |
&& dpkg -i libssl1.1_1.1.1f-1ubuntu2.19_amd64.deb \ | |
&& rm libssl1.1_1.1.1f-1ubuntu2.19_amd64.deb \ | |
&& wget -qO /tmp/cuda-keyring.deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb \ | |
&& dpkg -i /tmp/cuda-keyring.deb \ | |
&& apt-get update -q \ | |
&& apt-get install -y --no-install-recommends \ | |
libcudnn8 \ | |
libcublas-12-2 \ | |
&& apt-get clean \ | |
&& rm -rf /var/lib/apt/lists/* \ | |
&& mkdir -p ${MPLCONFIGDIR} ${TRANSFORMERS_CACHE} \ | |
&& chmod -R 777 /tmp | |
COPY requirements.txt . | |
RUN pip3 install --no-cache-dir -r requirements.txt | |
COPY main.py . | |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] |