Compare commits
3
Commits
5ea06d1176
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9d9c5ffb62 | ||
|
|
b796ca0603 | ||
|
|
b0a3377c14 |
@@ -0,0 +1,11 @@
|
||||
Build image:
|
||||
docker build -t <image_name> -f <dockerfile-name> .
|
||||
|
||||
Run your own image
|
||||
|
||||
|
||||
Wake computer remotely using docker (wake your own pc from the server for example)
|
||||
docker run --rm -it alpine ether-wake <MAC address, ex: 11:11:11:11:11:11>
|
||||
|
||||
System monitor:
|
||||
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock:ro --pid host --network host -it nicolargo/glances:latest
|
||||
@@ -0,0 +1,40 @@
|
||||
# Use an existing image as the base
|
||||
FROM pytorch/pytorch:1.12.0-cuda11.3-cudnn8-devel
|
||||
|
||||
# Add the current user to the image
|
||||
ARG USER_NAME=lhunor
|
||||
ARG USER_ID=11017
|
||||
ARG GROUP_NAME=guest
|
||||
ARG GROUP_ID=11000
|
||||
|
||||
# Update the system and install required packages
|
||||
RUN apt-get update && apt-get upgrade -y && apt-get install -y sudo git
|
||||
|
||||
# Create a new group with the same GID as the host
|
||||
RUN groupadd --gid $GROUP_ID $GROUP_NAME
|
||||
|
||||
# Create a new user with the same UID and GID as the host
|
||||
RUN useradd --uid $USER_ID --gid $GROUP_ID --shell /bin/bash --create-home $USER_NAME
|
||||
|
||||
# don't require password with sudo, for convenience
|
||||
# not the safest thing to do, but hopefully okay inside the container
|
||||
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
||||
|
||||
# Add the new user to the sudo group
|
||||
RUN usermod -aG sudo $USER_NAME
|
||||
|
||||
# Set the default user to the new user
|
||||
USER $USER_NAME
|
||||
|
||||
WORKDIR /home/$USER_NAME
|
||||
|
||||
COPY requirements.txt /tmp/
|
||||
RUN pip install --requirement /tmp/requirements.txt
|
||||
|
||||
# defining the volumes that will be mounted
|
||||
VOLUME [ "/data-net" ]
|
||||
VOLUME [ "/data-local" ]
|
||||
VOLUME [ "/home-net" ]
|
||||
|
||||
# Start the container with a bash shell
|
||||
CMD ["/bin/bash"]
|
||||
@@ -0,0 +1 @@
|
||||
numpy
|
||||
+5
-5
@@ -2,13 +2,13 @@
|
||||
FROM ubuntu:22.04
|
||||
|
||||
# Add the current user to the image
|
||||
ARG USER_NAME=lhunor
|
||||
ARG USER_ID=11017
|
||||
ARG GROUP_NAME=guest
|
||||
ARG GROUP_ID=11000
|
||||
ARG USER_NAME=
|
||||
ARG USER_ID=
|
||||
ARG GROUP_NAME=
|
||||
ARG GROUP_ID=
|
||||
|
||||
# Update the system and install required packages
|
||||
RUN apt-get update && apt-get upgrade -y && apt-get install -y sudo
|
||||
RUN apt-get update && apt-get upgrade -y && apt-get install -y sudo git
|
||||
|
||||
# Create a new group with the same GID as the host
|
||||
RUN groupadd --gid $GROUP_ID $GROUP_NAME
|
||||
|
||||
Reference in New Issue
Block a user