Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +9 -9
Dockerfile
CHANGED
@@ -17,26 +17,23 @@ RUN apt-get update && apt-get install -y \
|
|
17 |
portaudio19-dev \
|
18 |
python3-pip \
|
19 |
python3-venv \
|
20 |
-
libpq-dev \
|
21 |
python3-dev \
|
22 |
&& rm -rf /var/lib/apt/lists/*
|
23 |
|
24 |
-
# Create a new user named "
|
25 |
RUN useradd -m -u 1009 user9
|
26 |
|
27 |
-
# Switch to the "
|
28 |
USER user9
|
29 |
|
30 |
# Set environment variables for the user's home directory and PATH
|
31 |
-
ENV HOME=/home/
|
32 |
-
PATH=/home/
|
33 |
|
34 |
# Set the working directory to the user's app directory
|
35 |
WORKDIR $HOME/app
|
36 |
|
37 |
-
# Upgrade pip and install wheel as the non-root user
|
38 |
-
#RUN pip install --no-cache-dir --upgrade pip wheel
|
39 |
-
|
40 |
# Clone the repository into the working directory
|
41 |
RUN git clone -b ${BRANCH} ${REPO_URL} .
|
42 |
|
@@ -44,6 +41,9 @@ RUN git clone -b ${BRANCH} ${REPO_URL} .
|
|
44 |
RUN python3 -m venv venv
|
45 |
ENV PATH="$HOME/app/venv/bin:$PATH"
|
46 |
|
|
|
|
|
|
|
47 |
# Install CUDA libraries
|
48 |
RUN pip install --no-cache-dir nvidia-cublas-cu12 nvidia-cudnn-cu12
|
49 |
|
@@ -71,4 +71,4 @@ EXPOSE 7860
|
|
71 |
ENV GRADIO_SERVER_NAME="0.0.0.0"
|
72 |
|
73 |
# Define the default command to run the application
|
74 |
-
CMD ["python", "summarize.py", "-gui"]
|
|
|
17 |
portaudio19-dev \
|
18 |
python3-pip \
|
19 |
python3-venv \
|
20 |
+
libpq-dev \
|
21 |
python3-dev \
|
22 |
&& rm -rf /var/lib/apt/lists/*
|
23 |
|
24 |
+
# Create a new user named "user9" with user ID 1009
|
25 |
RUN useradd -m -u 1009 user9
|
26 |
|
27 |
+
# Switch to the "user9" user
|
28 |
USER user9
|
29 |
|
30 |
# Set environment variables for the user's home directory and PATH
|
31 |
+
ENV HOME=/home/user9 \
|
32 |
+
PATH=/home/user9/.local/bin:$PATH
|
33 |
|
34 |
# Set the working directory to the user's app directory
|
35 |
WORKDIR $HOME/app
|
36 |
|
|
|
|
|
|
|
37 |
# Clone the repository into the working directory
|
38 |
RUN git clone -b ${BRANCH} ${REPO_URL} .
|
39 |
|
|
|
41 |
RUN python3 -m venv venv
|
42 |
ENV PATH="$HOME/app/venv/bin:$PATH"
|
43 |
|
44 |
+
# Upgrade pip and install wheel as the non-root user
|
45 |
+
#RUN pip install --no-cache-dir --upgrade pip wheel
|
46 |
+
|
47 |
# Install CUDA libraries
|
48 |
RUN pip install --no-cache-dir nvidia-cublas-cu12 nvidia-cudnn-cu12
|
49 |
|
|
|
71 |
ENV GRADIO_SERVER_NAME="0.0.0.0"
|
72 |
|
73 |
# Define the default command to run the application
|
74 |
+
CMD ["python", "summarize.py", "-gui"]
|