TaskWeaver icon indicating copy to clipboard operation
TaskWeaver copied to clipboard

Install a specific package to Code Execution

Open chr1s3sw0rthy opened this issue 1 year ago • 2 comments
trafficstars

I want to add openpyxl to the installed packaged ( it is not by default).

I added this to /ces_container/Dockerfile

Copy the requrements file

COPY requirements.txt . RUN pip install --no-cache-dir --no-warn-script-location -r requirements.txt

TODO: Install additional packages for plugins

RUN pip install --no-cache-dir --no-warn-script-location --user openpyxl

for good measure, I added openpyxl to requirements.txt too.

when I run ./build_executor, It creates a docker image that contains openpyxl. All good.

When I enter a prompt that executes code, TW finds that the image installed is not right, so I pulls :latest from docker.io.

Can someone offer some guidance?

chr1s3sw0rthy avatar Sep 04 '24 18:09 chr1s3sw0rthy

Thanks for raising this issue. The current behavior is TW always downloads the :last image from docker.io. A next PR is planned to fix this issue.

liqul avatar Oct 10 '24 02:10 liqul

I think this is a duplicate of #392.

timdp avatar Feb 11 '25 14:02 timdp