Spaces:
Sleeping
Sleeping
Commit ·
3075c72
1
Parent(s): 7748c82
lets go
Browse files- Dockerfile +17 -2
Dockerfile
CHANGED
|
@@ -42,5 +42,20 @@ RUN python -c "import torch; print(torch.__version__)" && \
|
|
| 42 |
# Working directory for MLIR operations
|
| 43 |
#WORKDIR /workspace
|
| 44 |
|
| 45 |
-
#
|
| 46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
# Working directory for MLIR operations
|
| 43 |
#WORKDIR /workspace
|
| 44 |
|
| 45 |
+
# Set up a new user named "user"
|
| 46 |
+
RUN useradd -m -o -u 1000 user
|
| 47 |
+
|
| 48 |
+
# Switch to the "user" user
|
| 49 |
+
USER user
|
| 50 |
+
|
| 51 |
+
# Set home to the user's home directory
|
| 52 |
+
ENV HOME=/home/user \
|
| 53 |
+
PATH=/home/user/.local/bin:$PATH
|
| 54 |
+
|
| 55 |
+
# Set the working directory to the user's home directory
|
| 56 |
+
WORKDIR $HOME/app
|
| 57 |
+
|
| 58 |
+
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
| 59 |
+
COPY --chown=user . $HOME/app
|
| 60 |
+
|
| 61 |
+
CMD ["python", "main.py"]
|