Skip to content

Commit cef4d3c

Browse files
authored
chore: Fix Dockerfiles to install feast correctly (feast-dev#2635)
* chore: Fix Dockerfiles to install feast correctly Also removes an unsued python script since we use the pypa/gh-action-pypi-publish action to build and publish wheels now. Signed-off-by: Achal Shah <achals@gmail.com> * more fixes Signed-off-by: Achal Shah <achals@gmail.com> * add a verify step before we publish to pypi wheel Signed-off-by: Achal Shah <achals@gmail.com> * more fixes Signed-off-by: Achal Shah <achals@gmail.com>
1 parent d59a91c commit cef4d3c

File tree

7 files changed

+30
-59
lines changed

7 files changed

+30
-59
lines changed

.github/workflows/publish.yml

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ jobs:
127127

128128
publish-python-sdk:
129129
runs-on: ubuntu-latest
130-
needs: [build-python-sdk, build-python-sdk-macos-py310]
130+
needs: [verify-python-wheel]
131131
steps:
132132
- uses: actions/download-artifact@v2
133133
with:
@@ -139,20 +139,35 @@ jobs:
139139
password: ${{ secrets.PYPI_PASSWORD }}
140140

141141

142+
verify-python-wheel:
143+
runs-on: ubuntu-latest
144+
needs: [build-python-sdk, build-python-sdk-macos-py310]
145+
steps:
146+
- name: Setup Python
147+
id: setup-python
148+
uses: actions/setup-python@v2
149+
with:
150+
python-version: "3.8"
151+
architecture: x64
152+
- uses: actions/download-artifact@v2
153+
with:
154+
name: wheels
155+
path: dist
156+
- name: Install wheel
157+
run: pip install dist/*38*linux*.whl
158+
- name: Install sdist
159+
run: pip install dist/*tar.gz
160+
142161
build-python-sdk:
143162
name: Build wheels on ${{ matrix.os }}
144163
runs-on: ${{ matrix.os }}
145164
strategy:
146165
matrix:
147166
os: [ ubuntu-latest, macos-10.15 ]
148-
149167
steps:
150168
- uses: actions/checkout@v2
151-
152169
- name: Build wheels
153170
uses: pypa/cibuildwheel@v2.4.0
154-
with:
155-
package-dir: sdk/python
156171
env:
157172
CIBW_BUILD: "cp3*_x86_64"
158173
CIBW_SKIP: "cp36-* *-musllinux_x86_64 cp310-macosx_x86_64"
@@ -195,13 +210,12 @@ jobs:
195210
make install-go-ci-dependencies
196211
- name: Build
197212
run: |
198-
cd sdk/python
199213
python3 setup.py sdist bdist_wheel
200214
201215
- uses: actions/upload-artifact@v2
202216
with:
203217
name: wheels
204-
path: sdk/python/dist/*
218+
path: dist/*
205219

206220

207221
publish-java-sdk:

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ pip install --upgrade pip
9191

9292
4. Install development dependencies for Feast Python SDK / CLI
9393
```sh
94-
pip install -e "sdk/python[dev]"
94+
pip install -e ".[dev]"
9595
```
9696

9797
### Code Style & Linting

infra/scripts/publish-python-sdk.sh

Lines changed: 0 additions & 47 deletions
This file was deleted.

java/serving/src/test/resources/docker-compose/feast10/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ COPY requirements.txt ./
66
RUN pip install --no-cache-dir -r requirements.txt
77

88
RUN git clone https://github.com/feast-dev/feast.git /root/feast
9-
RUN cd /root/feast/sdk/python && pip install -e '.[redis]'
9+
RUN cd /root/feast/ && pip install -e '.[redis]'
1010

1111
WORKDIR /app
1212
COPY . .

sdk/python/feast/infra/aws.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ def _get_docker_image_version() -> str:
347347
f"version {get_version()}. If you want to update the Feast SDK version, make "
348348
"sure to first fetch all new release tags from Github and then reinstall the library:\n"
349349
"> git fetch --all --tags\n"
350-
"> pip install -e sdk/python"
350+
"> pip install -e '.'"
351351
)
352352
return version
353353

sdk/python/feast/infra/transformation_servers/Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,14 @@ COPY sdk/python/feast/infra/transformation_servers/app.py app.py
66
# Copy necessary parts of the Feast codebase
77
COPY sdk/python sdk/python
88
COPY protos protos
9+
COPY go go
10+
COPY setup.py setup.py
11+
COPY pyproject.toml pyproject.toml
912
COPY README.md README.md
1013

14+
1115
# Install dependencies
12-
RUN pip3 install -e 'sdk/python'
16+
RUN pip3 install -e '.'
1317

1418
# Start feature transformation server
1519
CMD [ "python", "app.py" ]

ui/feature_repo/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ git clone https://github.com/feast-dev/feast.git
1818
Install a dev build of feast
1919
```bash
2020
cd feast
21-
pip install -e "sdk/python[dev]"
21+
pip install -e ".[dev]"
2222
```
2323

2424
Then for this demo, you'll actually need to fix a bug by adding this to `type_map.py#L144`:

0 commit comments

Comments
 (0)