Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 77d093b

Browse files
committed
imagedims-python minor updates
1 parent 9617599 commit 77d093b

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

‎imagedims-python/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FROM fnproject/python:3.6-dev as build-stage
22
WORKDIR /function
33
ADD requirements.txt /function/
44
RUN pip3 install --target /python/ --no-cache --no-cache-dir -r requirements.txt &&\
5-
rm -fr ~/.cache/pip /tmp* requirements.txt func.yaml Dockerfile .venv
5+
rm -fr ~/.cache/pip /tmp* requirements.txt func.yaml Dockerfile .venv
66
ADD . /function/
77
RUN rm -fr /function/.pip_cache
88

‎imagedims-python/README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Before you deploy this sample function, make sure you have run steps A, B and C
3333
* C - Set up your Cloud Shell dev environment
3434

3535

36-
## Review and customize your function
36+
## Review and customize the function
3737
Review the following files in the current folder:
3838
* the code of the function, [func.py](./func.py)
3939
* the function dependencies, [requirements.txt](./requirements.txt)
@@ -62,7 +62,7 @@ FROM fnproject/python:3.6-dev as build-stage
6262
WORKDIR /function
6363
ADD requirements.txt /function/
6464
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
6666
ADD . /function/
6767
RUN rm -fr /function/.pip_cache
6868

@@ -94,23 +94,22 @@ so we need to add the *RUN* command after the *FROM fnproject/python:3.6* line.
9494

9595
## Deploy the function
9696
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.
9998

10099
![user input icon](./images/userinput.png)
101100
```
102-
fn -v deploy --app <your-app-name>
101+
fn -v deploy --app <app-name>
103102
```
104103

105104

106-
## Invoke the Function
105+
## Invoke the function
107106
With the function deployed let's invoke it to make sure it's working as
108107
expected. You'll need a jpeg or png file so either find one on your machine
109108
or download one. The *3x3.jpg* image in this repo has a height and width of 3 pixels.
110109

111110
![](images/userinput.png)
112111
```
113-
cat 3x3.jpg | fn invoke <your-app-name> imagedims-python
112+
cat 3x3.jpg | fn invoke <app-name> imagedims-python
114113
```
115114

116115
You should see the following output:
@@ -125,4 +124,4 @@ use custom-defined Docker container images as functions. This feature makes it
125124
possible to customize your function's runtime environment including letting you
126125
install any Linux libraries or utilities that your function might need. And
127126
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.

‎imagedims-python/func.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#
22
# imagedims-python version 1.0.
33
#
4-
# Copyright (c) 2020 Oracle, Inc. All rights reserved.
4+
# Copyright (c) 2020 Oracle, Inc.
55
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
66
#
77

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /