Pickle Error When Restoring RLLIB Checkpoint

For a while, I have been working on an RLLIB-based project using a conda environment. I decided, recently, to Docker-ize the environment to make sure the environment is reproducible anywhere. This is what my Dockerfile looks like:

FROM rayproject/ray:1.6.0-py38

RUN pip install ray[rllib] torch==1.10.2 pettingzoo pytest gym==0.21.0 tqdm pandas

COPY . /work
RUN pip install -e .

After installing the dependencies and running the code, I consistently get the following error:

 File "/home/ray/anaconda3/lib/python3.8/site-packages/ray/tune/trainable.py", line 364, in restore
    metadata = pickle.load(f)
TypeError: an integer is required (got type bytes)

Based on some initial research, it seems like this may be due to some sort of version mismatch between ray and its dependencies. I have confirmed that each of the dependencies’ versions match the versions in the original conda environment, but the issue still persists. Has anyone had this issue with ray or rllib before? If so, is there a recommended course of action for an error like this?