-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
429ea98
commit 157f27c
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Use the official Julia 1.6 base image | ||
FROM julia:1.10 | ||
|
||
# Set the working directory inside the container | ||
WORKDIR /app | ||
|
||
# Install R and R development packages | ||
RUN apt-get update && apt-get install -y \ | ||
r-base \ | ||
r-base-dev | ||
|
||
# Copy all files from the current directory to /app in the container | ||
COPY . . | ||
|
||
# Install specific Julia packages, but only if the Project.toml or Manifest.toml changes | ||
RUN julia --project=/app -e 'using Pkg; Pkg.add("RCall"); Pkg.add("Distributions"); Pkg.add("Random")' | ||
|
||
# Run Julia commands during the image build process | ||
# Set the project to /app and instantiate dependencies | ||
RUN julia --project=/app -e 'using Pkg; Pkg.instantiate(); Pkg.build()' | ||
|
||
# Specify the default command to run when the container starts | ||
CMD ["julia", "--project=/app", "-e", "using Pkg; Pkg.test()"] |