If you want to run docker as non-root user then you need to add it to the docker group.
- Create the docker group if it does not exist
$ sudo groupadd docker- Add your user to the docker group.
| import cv2 | |
| import numpy as np | |
| # Loading the image and resize it | |
| image = cv2.imread('Manchester_United.png') | |
| image = cv2.resize(image, (1280, 720)) | |
| # Convert the color space from BGR to HSV | |
| image_hsv = cv2.cvtColor(image, cv2.COLOR_BGR2HSV) |
If you want to run docker as non-root user then you need to add it to the docker group.
$ sudo groupadd dockerIf you've already created a Docker container with something like SQL Server 2019 Developer edition:
$ docker run -e ACCEPT_EULA=Y -e MSSQL_PID=Developer -e MSSQL_SA_PASSWORD=YourStrongPassw0rd -p 1433:1433 -d mcr.microsoft.com/mssql/server:2019-latestWith reference to Configure SQL Server on Linux with the mssql-conf tool, get a root shell in the container:
$ docker exec -it --user root 57301203bac5 bash| # train_grpo.py | |
| import re | |
| import torch | |
| from datasets import load_dataset, Dataset | |
| from transformers import AutoTokenizer, AutoModelForCausalLM | |
| from peft import LoraConfig | |
| from trl import GRPOConfig, GRPOTrainer | |
| # Load and prep dataset |