File size: 781 Bytes
f3daba8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# 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" ]