# Use an official Python runtime as a parent image | |
FROM python:3.9 | |
# Set the working directory in the container | |
WORKDIR /code | |
# Copy the current directory contents into the container at /code | |
COPY . /code | |
# Install any needed packages specified in requirements.txt | |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt | |
# Create the installer_files directory with the correct permissions | |
RUN mkdir -p /code/installer_files \ | |
&& chmod 777 /code/installer_files | |
# Copy the Miniconda installer script | |
# Assuming you have it in your project directory; if not, you'll need to download it | |
COPY Miniconda3-py310_23.3.1-0-Linux-x86_64.sh /code/installer_files/miniconda_installer.sh | |
# Make sure the installer script is executable | |
RUN chmod +x /code/installer_files/miniconda_installer.sh | |
# Install Miniconda | |
RUN /code/installer_files/miniconda_installer.sh -b -p /code/installer_files/conda | |
# Make sure the conda binary is executable and in the PATH | |
ENV PATH="/code/installer_files/conda/bin:${PATH}" | |
# Continue with any other setup you need... | |
# Make sure the start script is executable | |
RUN chmod +x /code/start_linux.sh | |
# Run the start script when the container launches | |
CMD ["/code/start_linux.sh"] | |