Spaces:
Running
on
A10G
Running
on
A10G
Commit
•
5b41df7
1
Parent(s):
e3129bb
fix permissions
Browse files- Dockerfile +8 -4
Dockerfile
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
from nvidia/cuda:12.1.1-devel-ubuntu22.04
|
2 |
|
3 |
-
#
|
4 |
ENV DEBIAN_FRONTEND=noninteractive
|
5 |
|
6 |
# Install the required packages
|
@@ -30,15 +30,19 @@ RUN apt-get install -y \
|
|
30 |
libgtk2.0.0
|
31 |
|
32 |
# Working directory
|
33 |
-
|
|
|
|
|
|
|
|
|
34 |
|
35 |
-
COPY requirements.txt
|
36 |
|
37 |
# Install the required Python packages
|
38 |
RUN python3.10 -m pip install -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cu121
|
39 |
|
40 |
# Copy all files to the working directory
|
41 |
-
COPY .
|
42 |
|
43 |
EXPOSE 7860
|
44 |
|
|
|
1 |
from nvidia/cuda:12.1.1-devel-ubuntu22.04
|
2 |
|
3 |
+
# Configure environment
|
4 |
ENV DEBIAN_FRONTEND=noninteractive
|
5 |
|
6 |
# Install the required packages
|
|
|
30 |
libgtk2.0.0
|
31 |
|
32 |
# Working directory
|
33 |
+
RUN useradd -m -u 1000 user
|
34 |
+
USER user
|
35 |
+
ENV HOME=/home/user \
|
36 |
+
PATH=/home/user/.local/bin:$PATH
|
37 |
+
WORKDIR $HOME/app
|
38 |
|
39 |
+
COPY requirements.txt $HOME/app
|
40 |
|
41 |
# Install the required Python packages
|
42 |
RUN python3.10 -m pip install -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cu121
|
43 |
|
44 |
# Copy all files to the working directory
|
45 |
+
COPY --chown=user . $HOME/app
|
46 |
|
47 |
EXPOSE 7860
|
48 |
|