yinwentao
commited on
Commit
•
02ffc2b
1
Parent(s):
7356412
updateDKfile
Browse files- Dockerfile +32 -11
- requirements.txt +0 -3
Dockerfile
CHANGED
@@ -1,17 +1,38 @@
|
|
1 |
FROM nvidia/cuda:11.3.1-cudnn8-devel-ubuntu18.04
|
2 |
-
|
3 |
RUN apt-get update && \
|
4 |
-
apt-get
|
5 |
-
|
6 |
-
|
7 |
-
RUN python -m pip install --upgrade pip
|
8 |
|
9 |
-
|
10 |
-
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
-
RUN
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
-
|
|
|
|
|
16 |
|
17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
FROM nvidia/cuda:11.3.1-cudnn8-devel-ubuntu18.04
|
|
|
2 |
RUN apt-get update && \
|
3 |
+
apt-get upgrade -y && \
|
4 |
+
apt-get install -y --no-install-recommends \
|
|
|
|
|
5 |
|
6 |
+
# ffmpeg \
|
7 |
+
ffmpeg \
|
8 |
+
|
9 |
+
apt-get clean && \
|
10 |
+
rm -rf /var/lib/apt/lists/*
|
11 |
+
RUN useradd -m -u 1000 user
|
12 |
+
USER user
|
13 |
+
ENV HOME=/home/user \
|
14 |
+
PATH=/home/user/.local/bin:${PATH}
|
15 |
+
WORKDIR ${HOME}/app
|
16 |
|
17 |
+
RUN curl https://pyenv.run | bash
|
18 |
+
ENV PATH=${HOME}/.pyenv/shims:${HOME}/.pyenv/bin:${PATH}
|
19 |
+
ENV PYTHON_VERSION=3.8.8
|
20 |
+
RUN pyenv install ${PYTHON_VERSION} && \
|
21 |
+
pyenv global ${PYTHON_VERSION} && \
|
22 |
+
pyenv rehash && \
|
23 |
+
pip install --no-cache-dir -U pip setuptools wheel
|
24 |
|
25 |
+
RUN pip install --no-cache-dir -U torch==1.12.1 torchvision==0.13.1 torchaudio==0.12.1
|
26 |
+
COPY --chown=1000 requirements.txt /tmp/requirements.txt
|
27 |
+
RUN pip install --no-cache-dir -U -r /tmp/requirements.txt
|
28 |
|
29 |
+
COPY --chown=1000 . ${HOME}/app
|
30 |
+
RUN ls -a
|
31 |
+
ENV PYTHONPATH=${HOME}/app \
|
32 |
+
PYTHONUNBUFFERED=1 \
|
33 |
+
GRADIO_ALLOW_FLAGGING=never \
|
34 |
+
GRADIO_NUM_PORTS=1 \
|
35 |
+
GRADIO_SERVER_NAME=0.0.0.0 \
|
36 |
+
GRADIO_THEME=huggingface \
|
37 |
+
SYSTEM=spaces
|
38 |
+
CMD ["python", "app.py"]
|
requirements.txt
CHANGED
@@ -1,6 +1,3 @@
|
|
1 |
-
--extra-index-url https://download.pytorch.org/whl/cu113
|
2 |
-
torch==1.12.1+cu113
|
3 |
-
torchvision==0.13.1+cu113
|
4 |
torchaudio==0.12.1
|
5 |
torch-ema
|
6 |
ninja
|
|
|
|
|
|
|
|
|
1 |
torchaudio==0.12.1
|
2 |
torch-ema
|
3 |
ninja
|