Spaces:
Configuration error
Configuration error
Kangarroar
commited on
Commit
•
ae07708
1
Parent(s):
3d7e9a7
Create Dockerfile
Browse files- Dockerfile +53 -0
Dockerfile
ADDED
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python 3.8.10
|
2 |
+
##CUDA
|
3 |
+
|
4 |
+
ADD file:8cba976cb6ea226de769a768ee274e7679d34f923c93392f340680dc6696232e in /
|
5 |
+
CMD ["bash"]
|
6 |
+
ENV NVARCH=sbsa
|
7 |
+
ENV NVIDIA_REQUIRE_CUDA=cuda>=12.0
|
8 |
+
ENV NV_CUDA_CUDART_VERSION=12.0.107-1
|
9 |
+
ARG TARGETARCH
|
10 |
+
LABEL maintainer=NVIDIA CORPORATION <cudatools@nvidia.com>
|
11 |
+
RUN |1 TARGETARCH=arm64 /bin/sh -c apt-get update && apt-get install -y --no-install-recommends gnupg2 curl ca-certificates && curl -fsSL https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/${NVARCH}/3bf863cc.pub | apt-key add - && echo "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/${NVARCH} /" > /etc/apt/sources.list.d/cuda.list && apt-get purge --autoremove -y curl && rm -rf /var/lib/apt/lists/* # buildkit
|
12 |
+
ENV CUDA_VERSION=12.0.0
|
13 |
+
RUN |1 TARGETARCH=arm64 /bin/sh -c apt-get update && apt-get install -y --no-install-recommends cuda-cudart-12-0=${NV_CUDA_CUDART_VERSION} ${NV_CUDA_COMPAT_PACKAGE} && rm -rf /var/lib/apt/lists/* # buildkit
|
14 |
+
RUN |1 TARGETARCH=arm64 /bin/sh -c echo "/usr/local/nvidia/lib" >> /etc/ld.so.conf.d/nvidia.conf && echo "/usr/local/nvidia/lib64" >> /etc/ld.so.conf.d/nvidia.conf # buildkit
|
15 |
+
ENV PATH=/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
16 |
+
ENV LD_LIBRARY_PATH=/usr/local/nvidia/lib:/usr/local/nvidia/lib64
|
17 |
+
COPY NGC-DL-CONTAINER-LICENSE / # buildkit
|
18 |
+
ENV NVIDIA_VISIBLE_DEVICES=all
|
19 |
+
ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility
|
20 |
+
####END CUDA
|
21 |
+
|
22 |
+
ARG DEBIAN_FRONTEND=noninteractive
|
23 |
+
ENV PYTHONUNBUFFERED=1
|
24 |
+
|
25 |
+
WORKDIR /app
|
26 |
+
|
27 |
+
COPY ./requirements.txt /app/requirements.txt
|
28 |
+
COPY ./packages.txt /app/packages.txt
|
29 |
+
RUN pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 torchaudio==0.12.1+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html
|
30 |
+
RUN apt-get update && xargs -r -a /app/packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/*
|
31 |
+
RUN apt-get update && apt-get install -y python3-dev
|
32 |
+
RUN apt-get update && apt-get install -y build-essential
|
33 |
+
RUN which python3
|
34 |
+
RUN which python3-config
|
35 |
+
RUN pip3 install --no-cache-dir -r /app/requirements.txt
|
36 |
+
RUN apt-get update && apt-get install -y build-essential
|
37 |
+
RUN pip3 install --no-cache-dir numba==0.56.3
|
38 |
+
RUN pip install --upgrade pip setuptools wheel
|
39 |
+
RUN pip3 install --no-binary :all: pyworld
|
40 |
+
RUN pip install soundfile
|
41 |
+
|
42 |
+
WORKDIR /app
|
43 |
+
# Set up a new user named "user" with user ID 1000
|
44 |
+
RUN useradd -m -u 1000 user
|
45 |
+
# Set the working directory to the user's home directory
|
46 |
+
WORKDIR $HOME/app
|
47 |
+
|
48 |
+
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
49 |
+
COPY --chown=user . $HOME/app
|
50 |
+
|
51 |
+
EXPOSE 8501
|
52 |
+
CMD nvidia-smi -l
|
53 |
+
CMD streamlit run app.py --server.maxUploadSize 1024 --server.enableWebsocketCompression=false --server.enableXsrfProtection=false
|