Spaces:
Runtime error
Runtime error
Updated Dockerfile for GPU Dependencies
Browse files- Dockerfile +33 -31
Dockerfile
CHANGED
@@ -6,48 +6,50 @@ ENV CUDA_HOME=/usr/local/cuda
|
|
6 |
ENV PATH=$CUDA_HOME/bin:$PATH
|
7 |
ENV LD_LIBRARY_PATH=$CUDA_HOME/lib64:$LD_LIBRARY_PATH
|
8 |
|
9 |
-
|
10 |
-
|
|
|
|
|
11 |
|
12 |
# # Install NVIDIA driver
|
13 |
# RUN apt-get update && apt-get install -y --no-install-recommends nvidia-driver-460
|
14 |
|
15 |
-
RUN apt-get -y update \
|
16 |
-
|
17 |
|
18 |
-
RUN apt-get -y update \
|
19 |
-
|
20 |
|
21 |
-
RUN apt-get -y update \
|
22 |
-
|
23 |
-
|
24 |
|
25 |
-
RUN apt-get -y update \
|
26 |
-
|
27 |
|
28 |
-
# Additional system dependencies
|
29 |
-
RUN apt-get -y update \
|
30 |
-
|
31 |
-
|
32 |
|
33 |
-
# FROM python:3.10
|
34 |
|
35 |
-
# Switch back to the root user to install Python packages
|
36 |
-
USER root
|
37 |
|
38 |
-
# Copy your requirements.txt and install Python packages
|
39 |
-
COPY ./requirements.txt /code/requirements.txt
|
40 |
-
RUN pip3 install --no-cache-dir --upgrade -r /code/requirements.txt
|
41 |
|
42 |
-
# Create a non-root user and set environment variables
|
43 |
-
RUN useradd -m -u 1000 user
|
44 |
-
USER user
|
45 |
-
ENV HOME=/home/user \
|
46 |
-
|
47 |
|
48 |
-
# Set the working directory and copy your application files
|
49 |
-
WORKDIR $HOME/app
|
50 |
-
COPY --chown=user . $HOME/app
|
51 |
|
52 |
-
# Specify the command to run your application
|
53 |
-
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
6 |
ENV PATH=$CUDA_HOME/bin:$PATH
|
7 |
ENV LD_LIBRARY_PATH=$CUDA_HOME/lib64:$LD_LIBRARY_PATH
|
8 |
|
9 |
+
RUN nvidia-smi
|
10 |
+
|
11 |
+
# # Set DEBIAN_FRONTEND to noninteractive to prevent interactive prompts
|
12 |
+
# ENV DEBIAN_FRONTEND=noninteractive
|
13 |
|
14 |
# # Install NVIDIA driver
|
15 |
# RUN apt-get update && apt-get install -y --no-install-recommends nvidia-driver-460
|
16 |
|
17 |
+
# RUN apt-get -y update \
|
18 |
+
# && apt-get install -y software-properties-common
|
19 |
|
20 |
+
# RUN apt-get -y update \
|
21 |
+
# && add-apt-repository ppa:deadsnakes/ppa
|
22 |
|
23 |
+
# RUN apt-get -y update \
|
24 |
+
# && apt-get -y install python3.10 \
|
25 |
+
# && apt-get -y install python3-pip
|
26 |
|
27 |
+
# RUN apt-get -y update \
|
28 |
+
# && apt-get -y install git
|
29 |
|
30 |
+
# # Additional system dependencies
|
31 |
+
# RUN apt-get -y update \
|
32 |
+
# && apt-get install -y ffmpeg \
|
33 |
+
# && apt-get install -y yt-dlp
|
34 |
|
35 |
+
# # FROM python:3.10
|
36 |
|
37 |
+
# # Switch back to the root user to install Python packages
|
38 |
+
# USER root
|
39 |
|
40 |
+
# # Copy your requirements.txt and install Python packages
|
41 |
+
# COPY ./requirements.txt /code/requirements.txt
|
42 |
+
# RUN pip3 install --no-cache-dir --upgrade -r /code/requirements.txt
|
43 |
|
44 |
+
# # Create a non-root user and set environment variables
|
45 |
+
# RUN useradd -m -u 1000 user
|
46 |
+
# USER user
|
47 |
+
# ENV HOME=/home/user \
|
48 |
+
# PATH=/home/user/.local/bin:$PATH
|
49 |
|
50 |
+
# # Set the working directory and copy your application files
|
51 |
+
# WORKDIR $HOME/app
|
52 |
+
# COPY --chown=user . $HOME/app
|
53 |
|
54 |
+
# # Specify the command to run your application
|
55 |
+
# CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|