Spaces:
Running
on
Zero
Running
on
Zero
FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04 | |
RUN apt-get update && apt-get install -y \ | |
python3 python3-pip python3-dev cmake build-essential \ | |
libboost-all-dev libopenblas-dev liblapack-dev | |
RUN git clone https://github.com/davisking/dlib.git /dlib \ | |
&& cd /dlib \ | |
&& mkdir build && cd build \ | |
&& cmake .. -DDLIB_USE_CUDA=1 \ | |
&& cmake --build . --config Release \ | |
&& python3 setup.py install | |
# Choose a writable directory, e.g., /home/user/huggingface | |
RUN mkdir -p /home/user/huggingface | |
RUN chmod -R 777 /home/user/huggingface | |
# Then set environment variables | |
ENV HF_HOME=/home/user/huggingface \ | |
HF_HUB_CACHE=/home/user/huggingface/hub \ | |
TRANSFORMERS_CACHE=/home/user/huggingface/hub | |
WORKDIR /app | |
COPY requirements.txt ./ | |
RUN pip install --upgrade pip && pip install -r requirements.txt | |
COPY . . | |
CMD ["python", "app.py"] | |
# FROM yogi0421/dlib-base-image:python38-dlib19.24.0 | |
# WORKDIR /app | |
# # Choose a writable directory, e.g., /home/user/huggingface | |
# RUN mkdir -p /home/user/huggingface | |
# RUN chmod -R 777 /home/user/huggingface | |
# # Then set environment variables | |
# ENV HF_HOME=/home/user/huggingface \ | |
# HF_HUB_CACHE=/home/user/huggingface/hub \ | |
# TRANSFORMERS_CACHE=/home/user/huggingface/hub | |
# COPY requirements.txt . | |
# RUN pip install --upgrade pip \ | |
# && pip install -r requirements.txt | |
# COPY . . | |
# CMD ["python", "app.py"] | |