Spaces:
Paused
Paused
Jagrut Thakare
commited on
Commit
·
6c30ecc
1
Parent(s):
ff1439b
v42
Browse files- Dockerfile +11 -13
Dockerfile
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
-
FROM nvidia/cuda:
|
|
|
2 |
|
3 |
ENV DEBIAN_FRONTEND=noninteractive \
|
4 |
PYTHONUNBUFFERED=1 \
|
@@ -6,14 +7,14 @@ ENV DEBIAN_FRONTEND=noninteractive \
|
|
6 |
HOME=/home/user \
|
7 |
PATH=/home/user/.local/bin:$PATH
|
8 |
|
9 |
-
# Install Python 3.
|
10 |
RUN apt-get update && \
|
11 |
-
apt-get install -y ffmpeg python3.
|
12 |
rm -rf /var/lib/apt/lists/*
|
13 |
|
14 |
-
# Make python3.
|
15 |
-
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.
|
16 |
-
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.
|
17 |
|
18 |
# Create non-root user and fix permissions
|
19 |
RUN useradd -m -u 1000 user && \
|
@@ -23,15 +24,12 @@ RUN useradd -m -u 1000 user && \
|
|
23 |
USER user
|
24 |
WORKDIR /home/user/app
|
25 |
|
26 |
-
|
27 |
# Copy files and install only Gradio
|
28 |
COPY --chown=user:user . /home/user/app
|
29 |
-
RUN
|
30 |
-
|
31 |
-
RUN
|
32 |
-
RUN
|
33 |
-
RUN python3.7 -m pip install --user --no-cache-dir torch==1.6.0+cu101 torchvision==0.7.0+cu101 torchaudio -f https://download.pytorch.org/whl/torch_stable.html
|
34 |
-
RUN python3.7 -m pip install --user --no-cache-dir onnx==1.9.0 onnxruntime-gpu==1.4.0 insightface==0.2.1 kornia==0.5.4 dill opencv-python scikit-image requests==2.25.1 wandb
|
35 |
|
36 |
COPY --chown=user:user . .
|
37 |
RUN chmod +x download_models.sh
|
|
|
1 |
+
FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu20.04
|
2 |
+
|
3 |
|
4 |
ENV DEBIAN_FRONTEND=noninteractive \
|
5 |
PYTHONUNBUFFERED=1 \
|
|
|
7 |
HOME=/home/user \
|
8 |
PATH=/home/user/.local/bin:$PATH
|
9 |
|
10 |
+
# Install Python 3.9 and git
|
11 |
RUN apt-get update && \
|
12 |
+
apt-get install -y ffmpeg python3.9 python3.9-distutils python3-pip git && \
|
13 |
rm -rf /var/lib/apt/lists/*
|
14 |
|
15 |
+
# Make python3.9 default
|
16 |
+
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.9 1 && \
|
17 |
+
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1
|
18 |
|
19 |
# Create non-root user and fix permissions
|
20 |
RUN useradd -m -u 1000 user && \
|
|
|
24 |
USER user
|
25 |
WORKDIR /home/user/app
|
26 |
|
|
|
27 |
# Copy files and install only Gradio
|
28 |
COPY --chown=user:user . /home/user/app
|
29 |
+
RUN pip install --user pydantic==2.8.2 gradio
|
30 |
+
|
31 |
+
RUN pip install --user torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
|
32 |
+
RUN pip install --user --no-cache-dir mxnet-cu112 onnxruntime-gpu==1.12 Cython requests==2.25.1 insightface==0.2.1 kornia==0.5.4 dill opencv-python onnx numpy scikit-image wandb
|
|
|
|
|
33 |
|
34 |
COPY --chown=user:user . .
|
35 |
RUN chmod +x download_models.sh
|