Spaces:
Sleeping
Sleeping
File size: 869 Bytes
52e1134 aceb54a 76d7398 aceb54a d4ae01b aceb54a cc08acb aceb54a 724e400 |
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 |
# Use a base image that includes CUDA 11.7 and the CUDA toolkit
FROM nvidia/cuda:11.7.1-cudnn8-devel-ubuntu22.04
RUN apt-get update && apt-get upgrade -y
RUN apt-get install -y wget
RUN apt-get install -y python3-pip python3-dev
RUN apt-get update && apt-get install ffmpeg libsm6 libxext6 -y
RUN apt-get install -y git
RUN pip3 install --upgrade pip
RUN pip3 install packaging
RUN pip install --no-cache-dir numpy==1.23.5
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
WORKDIR /app
COPY --chown=user ./requirements.txt requirements.txt
# Install torch first
# RUN pip install --no-cache-dir torch==2.0.1+cu117
# Now install the rest of the packages
RUN pip install --no-cache-dir --upgrade -r requirements.txt
# RUN pip install flash_attn
COPY --chown=user . /app
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |