Skip to content

[Bug] FinRL==0.3.6 cannot be installed in Docker Build #73

@lynnliu030

Description

@lynnliu030

I was following the instructions here: https://github.com/meta-pytorch/OpenEnv/tree/main/src/envs/finrl_env to build the docker image and run the server.

When building a Docker image that installs finrl==0.3.6, the installation fails due to inconsistent metadata between the published package version and its internal version tag. Adjusting to finrl==0.3.7 leads to other errors in the next step docker run -p 8000:8000 finrl-env:latest.

Dockerfile

FROM envtorch-base:latest

RUN pip install --no-cache-dir \
    finrl==0.3.6 \
    yfinance==0.2.28 \
    pandas==2.0.3 \
    numpy==1.24.3 \
    gymnasium==0.29.1 \
    stable-baselines3==2.1.0 \
    matplotlib==3.7.2 \
    ta==0.11.0 \
    stockstats==0.6.2

Build command

docker build -t finrl-env:latest -f src/envs/finrl_env/server/Dockerfile .

Error log

[+] Building 2.8s (6/9)                                                                                                                                                                     docker:default
 => [internal] load build definition from Dockerfile                                                                                                                                                  0.0s
 => => transferring dockerfile: 1.94kB                                                                                                                                                                0.0s
 => [internal] load metadata for docker.io/library/envtorch-base:latest                                                                                                                               0.0s
 => [internal] load .dockerignore                                                                                                                                                                     0.0s
 => => transferring context: 2B                                                                                                                                                                       0.0s
 => CACHED [1/5] FROM docker.io/library/envtorch-base:latest                                                                                                                                          0.0s
 => [internal] load build context                                                                                                                                                                     0.0s
 => => transferring context: 5.19kB                                                                                                                                                                   0.0s
 => ERROR [2/5] RUN pip install --no-cache-dir     finrl==0.3.6     yfinance==0.2.28     pandas==2.0.3     numpy==1.24.3     gymnasium==0.29.1     stable-baselines3==2.1.0     matplotlib==3.7.2     2.8s
------                                                                                                                                                                                                     
 > [2/5] RUN pip install --no-cache-dir     finrl==0.3.6     yfinance==0.2.28     pandas==2.0.3     numpy==1.24.3     gymnasium==0.29.1     stable-baselines3==2.1.0     matplotlib==3.7.2     ta==0.11.0     stockstats==0.6.2:                                                                                                                                                                                      
1.526 Collecting finrl==0.3.6                                                                                                                                                                              
1.547   Downloading finrl-0.3.6.tar.gz (75 kB)                                                                                                                                                             
1.553      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 75.6/75.6 kB 17.9 MB/s eta 0:00:00                                                                                                                     
1.571   Installing build dependencies: started
2.396   Installing build dependencies: finished with status 'done'
2.397   Getting requirements to build wheel: started
2.489   Getting requirements to build wheel: finished with status 'done'
2.490   Preparing metadata (pyproject.toml): started
2.638   Preparing metadata (pyproject.toml): finished with status 'done'
2.640   WARNING: Requested finrl==0.3.6 from https://files.pythonhosted.org/packages/65/22/94fd5875e26f5bc79cc1d3250f200843052c423dd4c604cf3362d5178388/finrl-0.3.6.tar.gz, but installing version 0.3.5
2.641 Discarding https://files.pythonhosted.org/packages/65/22/94fd5875e26f5bc79cc1d3250f200843052c423dd4c604cf3362d5178388/finrl-0.3.6.tar.gz (from https://pypi.org/simple/finrl/) (requires-python:>=3.7): Requested finrl==0.3.6 from https://files.pythonhosted.org/packages/65/22/94fd5875e26f5bc79cc1d3250f200843052c423dd4c604cf3362d5178388/finrl-0.3.6.tar.gz has inconsistent version: expected '0.3.6', but metadata has '0.3.5'
2.641 ERROR: Could not find a version that satisfies the requirement finrl==0.3.6 (from versions: 0.0.1, 0.0.2, 0.0.3, 0.3.0, 0.3.1, 0.3.4, 0.3.5, 0.3.6, 0.3.7)
2.641 ERROR: No matching distribution found for finrl==0.3.6
2.711 
2.711 [notice] A new release of pip is available: 24.0 -> 25.2
2.711 [notice] To update, run: pip install --upgrade pip

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions