diff --git a/Dockerfile b/Dockerfile index 7a3f2fc..67baf82 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,33 +1,17 @@ -# Use Miniconda3 as the base image -FROM continuumio/miniconda3:latest +# Use an official Python runtime as a parent image +FROM python:3.11-slim # Set the working directory in the container WORKDIR /app -# Install system dependencies -RUN apt-get update && \ - apt-get install -y git unzip g++ gcc libgeos++-dev libproj-dev proj-data proj-bin && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* - -# Copy the pyproject.toml file and the entire project directory -COPY pyproject.toml . +# Copy the project files to the container COPY . /app -# Create a new conda environment -RUN conda create -n myenv python=3.12 -y - -# Activate the conda environment -SHELL ["conda", "run", "-n", "myenv", "/bin/bash", "-c"] - -# Install conda packages -RUN conda install -c conda-forge xesmf esmpy h5py numcodecs -y - # Install the project and its dependencies -RUN pip install --no-cache-dir -e . +RUN pip install . # Expose port 8000 to the outside world EXPOSE 8000 -# Set the default command to run when the container starts -CMD ["conda", "run", "--no-capture-output", "-n", "myenv", "python", "api/main.py"] \ No newline at end of file +# Run the application using python main.py +CMD ["python", "api/main.py"]