Skip to content

Commit

Permalink
Update docker image versions in examples and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
RobbeSneyders committed Feb 19, 2024
1 parent 53be875 commit 6ca2058
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion data_explorer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=linux/amd64 python:3.8-slim
FROM --platform=linux/amd64 python:3.10-slim

ENV PYTHONUNBUFFERED=1
ENV PYTHONIOENCODING=UTF-8
Expand Down
2 changes: 1 addition & 1 deletion docs/components/containerized_components.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ The `Dockerfile` defines how to build the component into a Docker image. An exam
defined below.

```bash
FROM --platform=linux/amd64 python:3.8-slim
FROM --platform=linux/amd64 python:3.10-slim

# install requirements
COPY requirements.txt ./
Expand Down
2 changes: 1 addition & 1 deletion docs/components/lightweight_components.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ image instead of the default one. Make sure you install Fondant in the base imag
in the `extra_requires` argument.

```python title="pipeline.py"
@lightweight_component(base_image="python:3.8-slim")
@lightweight_component(base_image="python:3.10-slim")
```

## Optimizing loaded data
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Check out the [guide](../components/publishing_components.md) on publishing comp
## Docker installation

To execute pipelines locally, you must
have [Docker compose](https://docs.docker.com/compose/install/) and Python >=3.8
have [Docker compose](https://docs.docker.com/compose/install/) and Python >=3.9
installed on your system. We only support Docker compose V2 and above. If you have an older version of
Docker compose, please upgrade to the latest version as described in the [Docker compose migration doc](https://docs.docker.com/compose/migrate/).

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=linux/amd64 python:3.8-slim
FROM --platform=linux/amd64 python:3.10-slim

# System dependencies
RUN apt-get update && \
Expand Down
2 changes: 1 addition & 1 deletion examples/sample_pipeline/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@


@lightweight_component(
base_image="python:3.8",
base_image="python:3.10",
extra_requires=[
f"fondant[component]@git+https://github.com/ml6team/fondant@"
f"{os.environ.get('FONDANT_VERSION', 'main')}",
Expand Down
2 changes: 1 addition & 1 deletion scripts/build_base_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ while [[ "$#" -gt 0 ]]; do case $1 in
esac; shift; done

# Supported Python versions
python_versions=("3.8" "3.9" "3.10" "3.11")
python_versions=("3.9" "3.10" "3.11")

for tag in "${tags[@]}"; do
for python_version in "${python_versions[@]}"; do
Expand Down
2 changes: 1 addition & 1 deletion tests/examples/example_component/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FROM --platform=linux/amd64 python:3.8-slim as base
FROM --platform=linux/amd64 python:3.10-slim as base
6 changes: 3 additions & 3 deletions tests/pipeline/test_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ def test_kubeflow_component_spec_from_lightweight_component(
)

@lightweight_component(
base_image="python:3.8-slim-buster",
base_image="python:3.10-slim-buster",
extra_requires=["pandas", "dask"],
produces={"x": pa.int32(), "y": pa.int32()},
)
Expand All @@ -442,7 +442,7 @@ def load(self) -> dd.DataFrame:
compiler.compile(pipeline=pipeline, output_path=output_path)
pipeline_configs = KubeflowPipelineConfigs.from_spec(output_path)
assert pipeline_configs.component_configs["createdata"].image == (
"python:3.8-slim-buster"
"python:3.10-slim-buster"
)
assert pipeline_configs.component_configs["createdata"].command == [
"sh",
Expand Down Expand Up @@ -793,7 +793,7 @@ def test_sagemaker_generate_script(tmp_path_factory):

def test_sagemaker_generate_script_lightweight_component(tmp_path_factory):
@lightweight_component(
base_image="python:3.8-slim-buster",
base_image="python:3.10-slim-buster",
extra_requires=["pandas", "dask"],
)
class CreateData(DaskLoadComponent):
Expand Down
14 changes: 7 additions & 7 deletions tests/pipeline/test_lightweight_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def load_pipeline(caplog):
)

@lightweight_component(
base_image="python:3.8-slim-buster",
base_image="python:3.10-slim-buster",
extra_requires=["pandas", "dask"],
produces={"x": pa.int32(), "y": pa.int32(), "z": pa.int32()},
)
Expand Down Expand Up @@ -100,7 +100,7 @@ def test_lightweight_component_sdk(default_fondant_image, load_pipeline):
assert operation_spec_dict == {
"specification": {
"name": "CreateData",
"image": "python:3.8-slim-buster",
"image": "python:3.10-slim-buster",
"description": "lightweight component",
"consumes": {"additionalProperties": True},
"produces": {
Expand Down Expand Up @@ -159,7 +159,7 @@ def transform(self, dataframe: pd.DataFrame) -> pd.DataFrame:

def test_consumes_mapping_all_fields(tmp_path_factory, load_pipeline):
@lightweight_component(
base_image="python:3.8",
base_image="python:3.10",
extra_requires=[
"fondant[component]@git+https://github.com/ml6team/fondant@main",
],
Expand Down Expand Up @@ -194,7 +194,7 @@ def transform(self, dataframe: pd.DataFrame) -> pd.DataFrame:

def test_consumes_mapping_specific_fields(tmp_path_factory, load_pipeline):
@lightweight_component(
base_image="python:3.8",
base_image="python:3.10",
extra_requires=[
"fondant[component]@git+https://github.com/ml6team/fondant@main",
],
Expand Down Expand Up @@ -231,7 +231,7 @@ def transform(self, dataframe: pd.DataFrame) -> pd.DataFrame:

def test_consumes_mapping_additional_fields(tmp_path_factory, load_pipeline):
@lightweight_component(
base_image="python:3.8",
base_image="python:3.10",
extra_requires=[
"fondant[component]@git+https://github.com/ml6team/fondant@main",
],
Expand Down Expand Up @@ -268,7 +268,7 @@ def transform(self, dataframe: pd.DataFrame) -> pd.DataFrame:

def test_produces_mapping_additional_fields(tmp_path_factory, load_pipeline):
@lightweight_component(
base_image="python:3.8",
base_image="python:3.10",
extra_requires=[
"fondant[component]@git+https://github.com/ml6team/fondant@main",
],
Expand Down Expand Up @@ -322,7 +322,7 @@ def load(self) -> str:

def test_valid_load_component():
@lightweight_component(
base_image="python:3.8-slim-buster",
base_image="python:3.10-slim-buster",
)
class CreateData(DaskLoadComponent):
def load(self) -> dd.DataFrame:
Expand Down

0 comments on commit 6ca2058

Please sign in to comment.