... | ... | @@ -49,3 +49,37 @@ fi |
|
|
Now run `update_conda.py --config /opt/conda/conda_config.yaml` This will take a while (<span dir="">\~</span>15 minutes or more per environment).
|
|
|
|
|
|
# Create conda service and timer
|
|
|
|
|
|
Create `/etc/systemd/system/conda.service`
|
|
|
|
|
|
```
|
|
|
[Unit]
|
|
|
Description=Install or update conda environments
|
|
|
|
|
|
[Service]
|
|
|
Type=oneshot
|
|
|
User=cdsadmin
|
|
|
ExecStart=/usr/bin/update_conda.py --config-path /opt/conda/conda_config.yaml
|
|
|
```
|
|
|
|
|
|
Create `/etc/systemd/system/conda.service`
|
|
|
|
|
|
```
|
|
|
[Unit]
|
|
|
Description=Update conda environments daily
|
|
|
|
|
|
[Timer]
|
|
|
OnBootSec=5min
|
|
|
OnCalendar=*-*-* 3:45:00
|
|
|
RandomizedDelaySec=3600
|
|
|
|
|
|
[Install]
|
|
|
WantedBy=timers.target
|
|
|
```
|
|
|
|
|
|
Change the ownership of `/opt/conda` to belong to `cdsadmin` and make the script executable by `cdsadmin`
|
|
|
|
|
|
```
|
|
|
chown -R cdsadmin:cdsadmin /opt/conda
|
|
|
chmod +x /usr/bin/update_conda.py
|
|
|
``` |
|
|
\ No newline at end of file |