masanorihirano commited on
Commit
3d44d9f
·
verified ·
1 Parent(s): dbf847f

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +29 -0
Dockerfile ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM docker.io/nvidia/cuda:12.4.1-cudnn-devel-ubuntu22.04
2
+ ENV TZ=Asia/Tokyo
3
+ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
4
+ RUN sed -i 's http://deb.debian.org http://cdn-aws.deb.debian.org g' /etc/apt/sources.list && \
5
+ sed -i 's http://archive.ubuntu.com http://us-east-1.ec2.archive.ubuntu.com g' /etc/apt/sources.list && \
6
+ sed -i '/security/d' /etc/apt/sources.list && apt-get update && \
7
+ apt-get install -y \
8
+ git \
9
+ make build-essential libssl-dev zlib1g-dev \
10
+ libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \
11
+ libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev git-lfs \
12
+ ffmpeg libsm6 libxext6 cmake libgl1-mesa-glx \
13
+ python3.10-dev && \
14
+ rm -rf /var/lib/apt/lists/* && \
15
+ git lfs install
16
+
17
+ RUN useradd -m -u 1000 user
18
+ USER user
19
+
20
+ COPY --link --chown=1000 ./requirements.txt /home/user/app/requirements.txt
21
+ WORKDIR /home/user/app
22
+
23
+ RUN pip install -U setuptools wheel
24
+ RUN pip install -r requirements.txt
25
+
26
+ COPY --link --chown=1000 ./app.py /home/user/app/app.py
27
+
28
+ EXPOSE 7860
29
+ ENTRYPOINT ["python", "app.py"]