Spaces:
Sleeping
Sleeping
File size: 869 Bytes
31f6961 b2a64fe 7380009 653976e b2a64fe aad72ce 5d05b3a aad72ce 653976e 5f98e1b 7380009 b2a64fe 7380009 bdd9100 544d523 |
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 |
FROM nvidia/cuda:12.2.2-cudnn8-runtime-ubuntu22.04
ENV PYTHON_VERSION=3.11
RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get -qq update \
&& apt-get -qq install --no-install-recommends \
python${PYTHON_VERSION} \
python${PYTHON_VERSION}-venv \
python3-pip \
libcublas11 \
&& rm -rf /var/lib/apt/lists/*
# Set the working directory
WORKDIR /
# Create a writable cache directory for Hugging Face
RUN mkdir -p /hf_cache && chmod -R 777 /hf_cache
# Set the environment variable for the Hugging Face cache
ENV HF_HOME=/hf_cache
# Copy the requirements.txt file and install the dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the current directory contents into the container at /app
COPY . .
# Run FastAPI with Uvicorn
CMD ["uvicorn", "infer:app", "--host", "0.0.0.0", "--port","7860"]
|