@@ -33,7 +33,7 @@ Before you deploy this sample function, make sure you have run steps A, B and C
33
33
* C - Set up your Cloud Shell dev environment
34
34
35
35
36
- ## Review and customize your function
36
+ ## Review and customize the function
37
37
Review the following files in the current folder:
38
38
* the code of the function, [ func.py] ( ./func.py )
39
39
* the function dependencies, [ requirements.txt] ( ./requirements.txt )
@@ -62,7 +62,7 @@ FROM fnproject/python:3.6-dev as build-stage
62
62
WORKDIR /function
63
63
ADD requirements.txt /function/
64
64
RUN pip3 install --target /python/ --no-cache --no-cache-dir -r requirements.txt &&\
65
- rm -fr ~/.cache/pip /tmp* requirements.txt func.yaml Dockerfile .venv
65
+ rm -fr ~/.cache/pip /tmp* requirements.txt func.yaml Dockerfile .venv
66
66
ADD . /function/
67
67
RUN rm -fr /function/.pip_cache
68
68
@@ -94,23 +94,22 @@ so we need to add the *RUN* command after the *FROM fnproject/python:3.6* line.
94
94
95
95
## Deploy the function
96
96
In Cloud Shell, run the * fn deploy* command to build the function and its dependencies as a Docker image,
97
- push the image to the specified Docker registry, and deploy the function to Oracle Functions
98
- in your application that you created earlier:
97
+ push the image to OCIR, and deploy the function to Oracle Functions in your application.
99
98
100
99
![ user input icon] ( ./images/userinput.png )
101
100
```
102
- fn -v deploy --app <your- app-name>
101
+ fn -v deploy --app <app-name>
103
102
```
104
103
105
104
106
- ## Invoke the Function
105
+ ## Invoke the function
107
106
With the function deployed let's invoke it to make sure it's working as
108
107
expected. You'll need a jpeg or png file so either find one on your machine
109
108
or download one. The * 3x3.jpg* image in this repo has a height and width of 3 pixels.
110
109
111
110
![ ] ( images/userinput.png )
112
111
```
113
- cat 3x3.jpg | fn invoke <your- app-name> imagedims-python
112
+ cat 3x3.jpg | fn invoke <app-name> imagedims-python
114
113
```
115
114
116
115
You should see the following output:
@@ -125,4 +124,4 @@ use custom-defined Docker container images as functions. This feature makes it
125
124
possible to customize your function's runtime environment including letting you
126
125
install any Linux libraries or utilities that your function might need. And
127
126
thanks to the Fn CLI's support for Dockerfiles it's the same user experience as
128
- when developing any function.
127
+ when developing any function.
0 commit comments