Atif
Atif
Explore posts from servers
CCoder.com
Created by Atif on 12/26/2022 in #help
How can coder use a docker swarm to deploy the workspaces?
I have a docker swarm consisting of 5 nodes. How can coder use this swarm to deploy workspaces. Also how will the home volume mounts be handled in this case. as they are currently on the main (leader) node.
2 replies
CCoder.com
Created by Atif on 10/4/2022 in #help
How to set workspace quota limits after 0.9.2 update?
How to set workspace quota limits after 0.9.2 update?
2 replies
CCoder.com
Created by Atif on 8/31/2022 in #help
can not activate conda enviornment in `startup_script`
atif@aihwkit:~$ cat build.log

CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
To initialize your shell, run

$ conda init <SHELL_NAME>

Currently supported shells are:
- bash
- fish
- tcsh
- xonsh
- zsh
- powershell

See 'conda init --help' for more information and options.

IMPORTANT: You may need to close and restart your shell after running 'conda init'.


atif@aihwkit:~$ conda activate DL
(DL) atif@aihwkit:~$
atif@aihwkit:~$ cat build.log

CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
To initialize your shell, run

$ conda init <SHELL_NAME>

Currently supported shells are:
- bash
- fish
- tcsh
- xonsh
- zsh
- powershell

See 'conda init --help' for more information and options.

IMPORTANT: You may need to close and restart your shell after running 'conda init'.


atif@aihwkit:~$ conda activate DL
(DL) atif@aihwkit:~$
21 replies
CCoder.com
Created by Atif on 8/26/2022 in #help
Disconnected workspace
bug: workspace becomes disconnected after inactivity and there is no way to connect again from the WebUI https://github.com/coder/coder/issues/3702
7 replies
CCoder.com
Created by Atif on 8/25/2022 in #help
Spyder IDE as a `coder_app`
Anyway to run Spyder IDE as a coder_app?
11 replies
CCoder.com
Created by Atif on 8/24/2022 in #help
Mount a Host folder as a volume
I am trying to mount a host folder /data/atif inside my workspace using the following settings.
resource "docker_container" "workspace" {
count = data.coder_workspace.me.start_count
image = docker_image.coder_image.latest
cpu_shares = var.cpu
memory = "${var.ram*1024}"
runtime = "nvidia"
gpus = "all"
# Uses lower() to avoid Docker restriction on container names.
name = "coder-${data.coder_workspace.me.owner}-${lower(data.coder_workspace.me.name)}"
# Hostname makes the shell more user friendly: coder@my-workspace:~$
hostname = lower(data.coder_workspace.me.name)
dns = ["1.1.1.1"]
# Use the docker gateway if the access URL is 127.0.0.1
command = ["sh", "-c", replace(coder_agent.dev.init_script, "127.0.0.1", "host.docker.internal")]
env = ["CODER_AGENT_TOKEN=${coder_agent.dev.token}"]

host {
host = "host.docker.internal"
ip = "host-gateway"
}
volumes {
container_path = "/home/${data.coder_workspace.me.owner}/"
volume_name = docker_volume.home_volume.name
host_path = "/data/${data.coder_workspace.me.owner}/"
read_only = false
}
}
resource "docker_container" "workspace" {
count = data.coder_workspace.me.start_count
image = docker_image.coder_image.latest
cpu_shares = var.cpu
memory = "${var.ram*1024}"
runtime = "nvidia"
gpus = "all"
# Uses lower() to avoid Docker restriction on container names.
name = "coder-${data.coder_workspace.me.owner}-${lower(data.coder_workspace.me.name)}"
# Hostname makes the shell more user friendly: coder@my-workspace:~$
hostname = lower(data.coder_workspace.me.name)
dns = ["1.1.1.1"]
# Use the docker gateway if the access URL is 127.0.0.1
command = ["sh", "-c", replace(coder_agent.dev.init_script, "127.0.0.1", "host.docker.internal")]
env = ["CODER_AGENT_TOKEN=${coder_agent.dev.token}"]

host {
host = "host.docker.internal"
ip = "host-gateway"
}
volumes {
container_path = "/home/${data.coder_workspace.me.owner}/"
volume_name = docker_volume.home_volume.name
host_path = "/data/${data.coder_workspace.me.owner}/"
read_only = false
}
}
But I am not seeing anything inside my workspace /home/atif/ What I am doing wrong. The folder already exists on the docker host and have some sub directories and files.
67 replies
CCoder.com
Created by Atif on 8/23/2022 in #help
LetsEncrypt SSL certificate
How to use a LetsEncrypt SSL certificate with local coder deployment?
22 replies
CCoder.com
Created by Atif on 8/23/2022 in #help
Can we rename a user?
I have created a user nut made a typo. How can I rename that user?
38 replies