sky24h's picture
init_commit
f3daba8
raw
history blame contribute delete
781 Bytes
# read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
# you will also find guides on how best to write your Dockerfile
# Include base image
FROM docker.io/pytorch/pytorch:2.0.1-cuda11.7-cudnn8-runtime
# Define working directory
WORKDIR /workspace/
# Set timezone
ENV TZ=Asia/Tokyo
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# Install dependencies
RUN apt-get update && apt-get -y install libgl1 libglib2.0-0 vim
RUN apt-get autoremove -y && apt-get clean -y
# Add pretrained model
ADD seg2art ./seg2art
ADD static ./static
ADD templates ./templates
ADD utils ./utils
# Add necessary files
ADD app.py ./
# pip install
ADD requirements.txt ./
RUN pip install -r requirements.txt
# Run server
CMD [ "python", "-u", "./app.py" ]