aephidayatuloh commited on
Commit
6d9e3db
·
1 Parent(s): 35044e1

chore: bypass renv and use fast binary packages from Posit

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -2
Dockerfile CHANGED
@@ -41,8 +41,12 @@ WORKDIR /app
41
  # 5. Salin semua file dari proyek lokal Anda ke dalam kontainer
42
  COPY . .
43
 
44
- COPY renv.lock ./
45
- RUN R -e "install.packages('renv'); renv::restore()"
 
 
 
 
46
 
47
  # 6. Atur hak akses agar kontainer bisa menulis file (misal saat mengunduh model)
48
  RUN chmod -R 777 /app
 
41
  # 5. Salin semua file dari proyek lokal Anda ke dalam kontainer
42
  COPY . .
43
 
44
+ # COPY renv.lock ./
45
+ # RUN R -e "install.packages('renv'); renv::restore()"
46
+
47
+ # Pasang paket R versi biner (Cepat dan Anti-Gagal Kompilasi)
48
+ # Kita menggunakan repositori 'noble' karena rocker:4.5.0 berbasis Ubuntu 24.04
49
+ RUN R -e "options(repos = c(CRAN = 'https://packagemanager.posit.co/cran/__linux__/noble/latest')); install.packages(c('plumber', 'vetiver', 'pins', 'DBI', 'RPostgres', 'jsonlite', 'dotenv', 'purrr', 'dplyr'))"
50
 
51
  # 6. Atur hak akses agar kontainer bisa menulis file (misal saat mengunduh model)
52
  RUN chmod -R 777 /app