Hello,
My CI pipeline fails due to a CondaHTTPError.
Very concisely:
- My .gitlab-ci.yml gets to the command:
docker build --pull -t "$CI_REGISTRY_IMAGE/image_name" -f dockerfile_name .
- The dockerfile commands start running and it fails at the command (full dockerfile at the bottom):
RUN conda create --yes --name my_env -c conda-forge python=3.11.5
Error message:
Step 6/11 : RUN conda create --yes --name my_env -c conda-forge python=3.11.5
---> Running in ea01f18dd131
Channels:
- conda-forge
- defaults
Platform: linux-64
Collecting package metadata (repodata.json): ...working... failed
CondaHTTPError: HTTP 429 TERMS OF SERVICE RATE LIMIT EXCEEDED for url <https://repo.anaconda.com/pkgs/main/linux-64/repodata.json>
Elapsed: 00:06.320422
CF-RAY: 8841de1e1aa0baf4-MXP
Your usage of the Anaconda package repository exceeds our rate limits. Please see https://www.anaconda.com/tos-access
I could run the same pipeline successfully copying the repository into a personal GitLab account.
Please let me know if I am missing something.
Thank you very much,
Sergio
Full dockerfile:
########################################################
# Renku install section - do not edit #
FROM renku/renkulab-py:3.10-0.22.0 as builder
# RENKU_VERSION determines the version of the renku CLI
# that will be used in this image. To find the latest version,
# visit https://pypi.org/project/renku/#history.
ARG RENKU_VERSION=2.9.2
# Install renku from pypi or from github if a dev version
RUN if [ -n "$RENKU_VERSION" ] ; then \
source .renku/venv/bin/activate ; \
currentversion=$(renku --version) ; \
if [ "$RENKU_VERSION" != "$currentversion" ] ; then \
pip uninstall renku -y ; \
gitversion=$(echo "$RENKU_VERSION" | sed -n "s/^[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+\(rc[[:digit:]]\+\)*\(\.dev[[:digit:]]\+\)*\(+g\([a-f0-9]\+\)\)*\(+dirty\)*$/\4/p") ; \
if [ -n "$gitversion" ] ; then \
pip install --no-cache-dir --force "git+https://github.com/SwissDataScienceCenter/renku-python.git@$gitversion" ;\
else \
pip install --no-cache-dir --force renku==${RENKU_VERSION} ;\
fi \
fi \
fi
# End Renku install section #
########################################################
FROM renku/renkulab-py:3.10-0.22.0
# Use an official Python runtime as a parent image
FROM continuumio/miniconda3:latest
# Create and activate a Conda environment
RUN conda create --yes --name my_env -c conda-forge python=3.11.5
# Set the working directory name
WORKDIR / myworkdir
# Copy the current directory contents into the container
COPY . /myworkdir
RUN /bin/bash -c "source activate my_env\
&& conda install -c conda-forge --yes --file requirements.txt\
&& pip install /myworkdir"
# Make port 8050 available to the world outside this container
EXPOSE 8050
# Define environment variable
# ENV NAME World
# Run app.py when the container launches
ENTRYPOINT ["conda", "run", "--no-capture-output", "-n", "my_env", "python", "app.py"]