Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +5 -2
Dockerfile
CHANGED
@@ -13,13 +13,13 @@ RUN apt-get update && apt-get install -y \
|
|
13 |
build-essential \
|
14 |
git \
|
15 |
python3 \
|
|
|
16 |
python3-pyaudio \
|
17 |
portaudio19-dev \
|
18 |
python3-pip \
|
19 |
python3-venv \
|
20 |
libpq-dev \
|
21 |
python3-dev \
|
22 |
-
python-is-python3 \
|
23 |
&& rm -rf /var/lib/apt/lists/*
|
24 |
|
25 |
# Create a new user named "user9" with user ID 1009
|
@@ -38,12 +38,15 @@ WORKDIR $HOME/app
|
|
38 |
# Clone the repository into the working directory
|
39 |
RUN git clone -b ${BRANCH} ${REPO_URL} .
|
40 |
|
|
|
|
|
|
|
41 |
# Create and activate a virtual environment
|
42 |
RUN python3 -m venv venv
|
43 |
ENV PATH="$HOME/app/venv/bin:$PATH"
|
44 |
|
45 |
# Upgrade pip and install wheel as the non-root user
|
46 |
-
|
47 |
|
48 |
# Install CUDA libraries
|
49 |
RUN pip install --no-cache-dir nvidia-cublas-cu12 nvidia-cudnn-cu12
|
|
|
13 |
build-essential \
|
14 |
git \
|
15 |
python3 \
|
16 |
+
python-is-python3 \ # Fixed trailing space
|
17 |
python3-pyaudio \
|
18 |
portaudio19-dev \
|
19 |
python3-pip \
|
20 |
python3-venv \
|
21 |
libpq-dev \
|
22 |
python3-dev \
|
|
|
23 |
&& rm -rf /var/lib/apt/lists/*
|
24 |
|
25 |
# Create a new user named "user9" with user ID 1009
|
|
|
38 |
# Clone the repository into the working directory
|
39 |
RUN git clone -b ${BRANCH} ${REPO_URL} .
|
40 |
|
41 |
+
# Set correct ownership and permissions for the app directory
|
42 |
+
RUN chmod -R u+rwX,go+rX,go-w /home/user9/app
|
43 |
+
|
44 |
# Create and activate a virtual environment
|
45 |
RUN python3 -m venv venv
|
46 |
ENV PATH="$HOME/app/venv/bin:$PATH"
|
47 |
|
48 |
# Upgrade pip and install wheel as the non-root user
|
49 |
+
RUN pip install --no-cache-dir --upgrade pip wheel
|
50 |
|
51 |
# Install CUDA libraries
|
52 |
RUN pip install --no-cache-dir nvidia-cublas-cu12 nvidia-cudnn-cu12
|