34 lines
1.1 KiB
Docker
34 lines
1.1 KiB
Docker
FROM rockylinux:8.8
|
|
|
|
# Set environment variables to reduce clutter and size
|
|
ENV MINICONDA_VERSION=py39_4.10.3
|
|
ENV PATH=/opt/conda/bin:$PATH
|
|
|
|
# Install necessary packages
|
|
RUN yum -y install wget bzip2 && \
|
|
yum clean all
|
|
|
|
# Download and install Miniconda
|
|
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-${MINICONDA_VERSION}-Linux-x86_64.sh -O /tmp/miniconda.sh && \
|
|
/bin/bash /tmp/miniconda.sh -b -p /opt/conda && \
|
|
rm /tmp/miniconda.sh
|
|
|
|
# Initialize Conda in bash config
|
|
RUN echo "source /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \
|
|
echo "conda activate base" >> ~/.bashrc
|
|
|
|
RUN conda install -c conda-forge conda-pack
|
|
|
|
# Copy the build scripts into the image
|
|
COPY build_and_pack_env.sh /usr/local/bin/build_and_pack_env.sh
|
|
COPY filename_extractor.sh /usr/local/bin/filename_extractor.sh
|
|
|
|
# Make the build script executable
|
|
RUN chmod +x /usr/local/bin/build_and_pack_env.sh
|
|
|
|
# Optionally, create a new Conda environment or install packages here
|
|
# For example, to create a new environment named 'myenv' with Python 3.8:
|
|
# RUN conda create --name myenv python=3.8
|
|
|
|
# Set the default command to run when starting the container
|
|
CMD [ "/bin/bash" ] |