From a768fecfdeb123d80b588c526491f1d8addf458a Mon Sep 17 00:00:00 2001 From: Kroese Date: Fri, 1 Dec 2023 03:55:25 +0100 Subject: [PATCH] fix: Default RAM size * fix: Default RAM size --- Dockerfile | 4 ++-- docker-compose.yml | 4 ++-- readme.md | 10 +++++----- src/reset.sh | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index b9b2917..10f36bc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -45,9 +45,9 @@ EXPOSE 139 EXPOSE 445 EXPOSE 5000 -ENV CPU_CORES "1" +ENV RAM_SIZE "1G" ENV DISK_SIZE "16G" -ENV RAM_SIZE "512M" +ENV CPU_CORES "1" ARG VERSION_ARG="0.0" RUN echo "$VERSION_ARG" > /run/version diff --git a/docker-compose.yml b/docker-compose.yml index 2345b4b..4fd2476 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,9 +4,9 @@ services: container_name: dsm image: vdsm/virtual-dsm:latest environment: - CPU_CORES: "1" DISK_SIZE: "16G" - RAM_SIZE: "512M" + RAM_SIZE: "1G" + CPU_CORES: "1" devices: - /dev/kvm - /dev/net/tun diff --git a/readme.md b/readme.md index 12f702b..4cc0d52 100644 --- a/readme.md +++ b/readme.md @@ -15,7 +15,7 @@ Virtual DSM in a docker container. ## Features - - Multi-platform + - Multiple disks - KVM acceleration - GPU passthrough - Upgrades supported @@ -58,7 +58,7 @@ docker run -it --rm -p 5000:5000 --device=/dev/kvm --cap-add NET_ADMIN --stop-ti ```yaml environment: - DISK_SIZE: "256G" + DISK_SIZE: "128G" ``` This can also be used to resize the existing disk to a larger capacity without any data loss. @@ -100,12 +100,12 @@ docker run -it --rm -p 5000:5000 --device=/dev/kvm --cap-add NET_ADMIN --stop-ti * ### How do I increase the amount of CPU or RAM? - By default, a single core and 512 MB of RAM are allocated to the container. To increase this, add the following environment variables: + By default, a single core and 1 GB of RAM are allocated to the container. To increase this, add the following environment variables: ```yaml environment: + RAM_SIZE: "4G" CPU_CORES: "4" - RAM_SIZE: "2048M" ``` * ### How do I verify if my system supports KVM? @@ -172,7 +172,7 @@ docker run -it --rm -p 5000:5000 --device=/dev/kvm --cap-add NET_ADMIN --stop-ti Please note that even if you don't need DHCP, it's still recommended to enable this feature as it prevents NAT issues and increases performance by using a `macvtap` interface. - * ### How do I passthrough my GPU? + * ### How do I passthrough the GPU? To passthrough your Intel GPU, add the following lines to your compose file: diff --git a/src/reset.sh b/src/reset.sh index a8900c3..19ff8bd 100644 --- a/src/reset.sh +++ b/src/reset.sh @@ -16,8 +16,8 @@ trap 'error "Status $? while: ${BASH_COMMAND} (line $LINENO/$BASH_LINENO)"' ERR : ${ALLOCATE:='Y'} # Preallocate diskspace : ${ARGUMENTS:=''} # Extra QEMU parameters : ${CPU_CORES:='1'} # Amount of CPU cores +: ${RAM_SIZE:='1G'} # Maximum RAM amount : ${DISK_SIZE:='16G'} # Initial data disk size -: ${RAM_SIZE:='512M'} # Maximum RAM amount # Helper variables