Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +12 -3
Dockerfile
CHANGED
@@ -2,11 +2,20 @@ ARG TORCH_VERSION=2.3.0
|
|
2 |
ARG CUDA_VERSION=12.1
|
3 |
FROM pytorch/pytorch:${TORCH_VERSION}-cuda${CUDA_VERSION}-cudnn8-runtime
|
4 |
|
5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
COPY requirements.txt .
|
8 |
-
|
9 |
-
RUN chmod -R 777 /root/.cache/huggingface/hub
|
10 |
RUN PYTHONDONTWRITEBYTECODE=1 pip install --no-cache-dir -r requirements.txt
|
11 |
|
12 |
RUN mkdir -p /opt/models && \
|
|
|
2 |
ARG CUDA_VERSION=12.1
|
3 |
FROM pytorch/pytorch:${TORCH_VERSION}-cuda${CUDA_VERSION}-cudnn8-runtime
|
4 |
|
5 |
+
# Set up a new user named "user" with user ID 1000
|
6 |
+
RUN useradd -m -u 1000 user
|
7 |
+
|
8 |
+
# Switch to the "user" user
|
9 |
+
USER user
|
10 |
+
|
11 |
+
# Set home to the user's home directory
|
12 |
+
ENV HOME=/home/user \
|
13 |
+
PATH=/home/user/.local/bin:$PATH
|
14 |
+
|
15 |
+
WORKDIR $HOME/opt/NekoImageGallery
|
16 |
|
17 |
COPY requirements.txt .
|
18 |
+
|
|
|
19 |
RUN PYTHONDONTWRITEBYTECODE=1 pip install --no-cache-dir -r requirements.txt
|
20 |
|
21 |
RUN mkdir -p /opt/models && \
|