Cahya Wirawan
commited on
Commit
•
15d40c2
1
Parent(s):
aba68ce
move to nvidia docker
Browse files- Dockerfile +24 -17
Dockerfile
CHANGED
@@ -1,20 +1,27 @@
|
|
1 |
-
FROM
|
2 |
-
|
|
|
3 |
RUN apt-get update && apt-get install -y \
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
COPY ./default /etc/nginx/sites-available
|
12 |
-
RUN chown -R 1000 /var/log/nginx/ /var/lib/nginx/ /run/ /
|
13 |
-
RUN mkdir -p /.config
|
14 |
-
RUN chown -R 1000 /.config
|
15 |
-
RUN chmod 777 /.config
|
16 |
-
RUN mkdir -p /.cache
|
17 |
-
RUN chown -R 1000 /.cache
|
18 |
-
RUN chmod 777 /.cache
|
19 |
EXPOSE 7860
|
20 |
-
CMD ["/bin/sh", "/
|
|
|
1 |
+
FROM nvidia/cuda:11.3.1-cudnn8-devel-ubuntu18.04
|
2 |
+
RUN useradd -m -u 1000 user
|
3 |
+
WORKDIR /home/user/app
|
4 |
RUN apt-get update && apt-get install -y \
|
5 |
+
git make build-essential libssl-dev zlib1g-dev \
|
6 |
+
libsqlite3-dev wget llvm libncursesw5-dev xz-utils tk-dev libxml2-dev \
|
7 |
+
libxmlsec1-dev libffi-dev liblzma-dev git-lfs ffmpeg libsm6 libxext6 cmake \
|
8 |
+
libgl1-mesa-glx curl nginx espeak-ng openssl libssl1.0-dev libbz2-dev \
|
9 |
+
libncurses5-dev libreadline-dev \
|
10 |
+
&& rm -rf /var/lib/apt/lists/* && git lfs install
|
11 |
+
RUN curl https://pyenv.run | bash
|
12 |
+
RUN pyenv install 3.8.9 && pyenv global 3.8.9 && pyenv rehash && \
|
13 |
+
pip install --no-cache-dir --upgrade pip setuptools wheel && \
|
14 |
+
pip install --no-cache-dir datasets huggingface-hub "protobuf<4" "click<8.1"
|
15 |
+
COPY ./requirements.txt /home/user/requirements.txt
|
16 |
+
RUN pip install --no-cache-dir --upgrade -r /home/user/requirements.txt
|
17 |
+
COPY ./app /home/user/app
|
18 |
COPY ./default /etc/nginx/sites-available
|
19 |
+
RUN chown -R 1000 /var/log/nginx/ /var/lib/nginx/ /run/ /home/user/app/
|
20 |
+
#RUN mkdir -p /home/user/.config
|
21 |
+
#RUN chown -R 1000 /home/user/.config
|
22 |
+
#RUN chmod 777 /home/user/.config
|
23 |
+
#RUN mkdir -p /home/user/.cache
|
24 |
+
#RUN chown -R 1000 /home/user/.cache
|
25 |
+
#RUN chmod 777 /home/user/.cache
|
26 |
EXPOSE 7860
|
27 |
+
CMD ["/bin/sh", "/home/user/app/start.sh"]
|