I am creating a Docker image with a env.yml file. This yml file has a Python package named mohit-housing-price-prediction=0.0.2 which I created locally. While creating an image using
docker build -t mohitsharmatigeranalytics/tamlep:0.3 .
I get
164.0 ERROR: Could not find a version that satisfies the requirement mohit-housing-price-prediction==0.0.2 (from versions: none)
My Dockerfile is
FROM continuumio/miniconda3
LABEL maintainer="Mohit Sharma"
WORKDIR /app
# Copy project files
COPY . /app
#Install dependencies using Conda
RUN conda env create -f docker_environment.yml
# Activatethe Conda environment
SHELL ["conda", "run", "-n", "mle-dev", "/bin/bash", "-c"]
# Set executable permissions for the Python scripts
RUN chmod +x src/housing_price_prediction/components/ingest_data.py \
&& chmod +x src/housing_price_prediction/components/train.py \
&& chmod +x src/housing_price_prediction/components/score.py
# Set executable permissions for the the .sh file
RUN chmod +x /app/run_scripts.sh
#Set entrypointand default command
ENTRYPOINT [ "conda", "run", "-n", "mle-dev" ]
CMD ["./run_scripts.sh"]
and my run_scripts.sh file is
#!/bin/bash
cd /app/src/housing_price_prediction/components
# Run data_ingest.py
echo "Running data_ingest.py..."
python ingest_data.py
# Run train.py
echo "Running train.py..."
python train.py
# Run score.py
echo "Running score.py..."
python score.py
Since I have already created the package locally, shouldn't the environment be created without any errors in the Docker image?