Skip to content

Commit

Permalink
Gode huskeregler og availableCores() fra future.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrbknudsen committed Feb 5, 2025
1 parent c83c941 commit 1b3492f
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions episodes/ucloud.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,13 @@ Reading the documentation reveals that it is not that simple:

"Where virtual machines are in use, one would hope that the result for logical = TRUE represents the number of CPUs available (or potentially available) to that particular VM."

Or use this:

```{r eval = FALSE}
future::availableCores()
```


### Memory

Looking at the interface, we see that we also get access to more memory, or RAM.
Expand Down Expand Up @@ -285,6 +292,8 @@ note that there is an "Upload" button in the Files pane in RStudio. Use that.

### What types of machines did I have access to?

UCloud offers the possibility of "projects" where you choices might be different.
If you're not in a "project" these will be the default options:

| name | vcpu | memory (GB) |
|------|------|-------------|
Expand Down Expand Up @@ -435,6 +444,10 @@ reticulate::use_condaenv("my_project_env", required = TRUE)

Before actually doing anything.





#### Other issues

Renv is a bit finicky. You might get messages about packages being in "an inconsistent
Expand All @@ -452,6 +465,15 @@ renv::snapshot()
renv::restore()
```

Sometimes renv forgets that a library is installed...

Fortunately the libraries are easily available, so an
```{r eval = FALSE}
renv::install("rstudio/keras3")
```

is fast. The example shows keras3 - exchange the package name
for what is actually missing.

### The sledgehammer solution

Expand Down

0 comments on commit 1b3492f

Please sign in to comment.