I am uploading an ecr image to an aws lambda and invoking it.
In the core code of this ecr image, I am importing stable-baseline3 (2.3.0), and I am using PPO within this library to use PPO.load().
It used to work fine, but recently I've been getting the error no module named “gym”
.
So I added gym 0.21.0 to the Dockerfile and built it, and while doing so, I got a log that asked me to install shimmy, so I added shimmy 1.3.0 to the Dockerfile as well.
However, I ended up getting an error saying that gymnasium.wrapper.monitoring was not found.
So I tried to avoid conflicts between gym and gymnasium by pip uninstall gymnasium from the Dockerfile, but even after doing this, I still get this error about gymnasium.wrapper.monitoring.
What could be causing me to suddenly get the above error when everything was fine up until now, and how can I fix it?
FROM public.ecr.aws/lambda/python:3.10
RUN yum install gcc -y
# Upgrade pip and install wheel
RUN pip3 install wheel==0.38.4
RUN pip3 install stable-baselines3==2.1.0
RUN pip3 install orjson
RUN pip3 install pytz
RUN pip3 install configparser
RUN pip3 install boto3==1.26.157
RUN pip3 install influxdb
RUN pip3 install pandas
RUN pip3 install pymysql
RUN pip3 install sagemaker
Now, I try to change(upgrade/downgrade) stable-baseline3 version. Is this the right way to fix the error?
I just downgrade stable-baseline3 from > 2 to 1.8.0.
And worked well NOW.