added neccesary docker code...
Browse files- Dockerfile +8 -4
Dockerfile
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
|
|
| 1 |
|
| 2 |
# "Handling Permission dennied Error"
|
|
|
|
|
|
|
| 3 |
|
|
|
|
|
|
|
| 4 |
|
| 5 |
-
|
|
|
|
|
|
|
| 6 |
|
| 7 |
# Install g++
|
| 8 |
RUN apt-get update && apt-get install -y g++
|
| 9 |
|
| 10 |
-
WORKDIR /app
|
| 11 |
-
|
| 12 |
-
COPY ./ /app
|
| 13 |
|
| 14 |
# For GPU support:
|
| 15 |
RUN pip3 install --extra-index-url https://download.pytorch.org/whl/cu118 torch torchvision
|
|
|
|
| 1 |
+
FROM python:3.10-slim
|
| 2 |
|
| 3 |
# "Handling Permission dennied Error"
|
| 4 |
+
RUN useradd user
|
| 5 |
+
USER user
|
| 6 |
|
| 7 |
+
ENV HOME=/home/user \
|
| 8 |
+
PATH=/home/user/.local/bin:$PATH
|
| 9 |
|
| 10 |
+
|
| 11 |
+
WORKDIR /app
|
| 12 |
+
COPY --chown=user ./ $HOME/app
|
| 13 |
|
| 14 |
# Install g++
|
| 15 |
RUN apt-get update && apt-get install -y g++
|
| 16 |
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
# For GPU support:
|
| 19 |
RUN pip3 install --extra-index-url https://download.pytorch.org/whl/cu118 torch torchvision
|