tttoaster commited on
Commit
145ce91
1 Parent(s): e9e5854

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +80 -0
Dockerfile ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use the official Python 3.11 image
2
+ FROM nvidia/cuda:11.7.1-cudnn8-devel-ubuntu22.04
3
+
4
+ ENV DEBIAN_FRONTEND=noninteractive
5
+
6
+ RUN apt-get update && \
7
+ apt-get upgrade -y && \
8
+ apt-get install -y --no-install-recommends \
9
+ git \
10
+ git-lfs \
11
+ wget \
12
+ curl \
13
+ # python build dependencies \
14
+ build-essential \
15
+ libssl-dev \
16
+ zlib1g-dev \
17
+ libbz2-dev \
18
+ libreadline-dev \
19
+ libsqlite3-dev \
20
+ libncursesw5-dev \
21
+ xz-utils \
22
+ tk-dev \
23
+ libxml2-dev \
24
+ libxmlsec1-dev \
25
+ libffi-dev \
26
+ liblzma-dev \
27
+ # gradio dependencies \
28
+ ffmpeg && \
29
+ apt-get clean && \
30
+ rm -rf /var/lib/apt/lists/*
31
+
32
+
33
+ # Copy the current directory contents into the container at /code
34
+ # COPY ./requirements.txt /code/requirements.txt
35
+ # RUN cat /code/requirements.txt
36
+
37
+ # Install requirements.txt
38
+ # RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
39
+ # RUN pip install -r /code/requirements.txt
40
+
41
+ # Set up a new user named "user" with user ID 1000
42
+ RUN useradd -m -u 1000 user
43
+ # Switch to the "user" user
44
+ USER user
45
+ # Set home to the user's home directory
46
+ ENV HOME=/home/user \
47
+ PATH=/home/user/.local/bin:$PATH \
48
+ HF_HOME=/data/.huggingface \
49
+ TORCH_HOME=/data/.huggingface
50
+
51
+ # Set the working directory to the user's home directory
52
+ WORKDIR $HOME/app
53
+
54
+
55
+ RUN curl https://pyenv.run | bash
56
+ ENV PATH=${HOME}/.pyenv/shims:${HOME}/.pyenv/bin:${PATH}
57
+ ARG PYTHON_VERSION=3.10.12
58
+ RUN pyenv install ${PYTHON_VERSION} && \
59
+ pyenv global ${PYTHON_VERSION} && \
60
+ pyenv rehash && \
61
+ pip install --no-cache-dir -U pip setuptools wheel
62
+
63
+ # Copy the current directory contents into the container at $HOME/app setting the owner to the user
64
+ COPY --chown=user . $HOME/app
65
+
66
+ RUN git lfs install
67
+
68
+ RUN pip install -r requirements.txt
69
+
70
+ # RUN ls -lh
71
+
72
+ # WORKDIR $HOME/app/pretrained
73
+ # RUN git lfs install
74
+ # RUN git clone https://huggingface.co/stabilityai/stable-diffusion-2-1-unclip
75
+ # RUN git clone https://huggingface.co/AILab-CVC/seed-tokenizer-2
76
+ # RUn git clone https://huggingface.co/AILab-CVC/seed-llama-14b-sft
77
+
78
+ # WORKDIR $HOME/app
79
+ CMD ["bash", "start.sh"]
80
+ # CMD ["python", 'start.py']