This is my Dockerfile
# Use the official Julia image
FROM julia:1.9
ENV JULIA_CPU_TARGET="generic;sandybridge,-xsaveopt,clone_all;haswell,-rdrnd,base(1)"
# # Install Julia dependencies
RUN julia -e "using Pkg; Pkg.add([\"CSV\", \"DataFrames\", \"Dates\", \"CairoMakie\"])"
RUN julia -e "using Pkg; Pkg.precompile();"
# install python
RUN apt-get update && apt-get install -y \
python3 \
python3-pip \
&& rm -rf /var/lib/apt/lists/*
CMD ["julia"]
I am using this image in my fly machine.
when i ssh into the machine, I can access those julia packages but if i call the exec
on the machine with the command julia demo.jl
, I get ERROR: LoadError: ArgumentError: Package CSV not found in current path. - Run import Pkg; Pkg.add("CSV") to install the CSV package.
error
I know this is happening because when using exec
it is using non interactive shell. What can I do here now?