generated from oracle-devrel/repo-template
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from paulparkinson/main
workshop init 3 - working and will use for doc...
- Loading branch information
Showing
16 changed files
with
164 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,17 @@ | ||
FROM openjdk:11-jre-slim | ||
FROM maven:3.6.3-openjdk-11 AS maven_build | ||
COPY pom.xml /tmp/pom.xml | ||
COPY env.properties /tmp/env.properties | ||
COPY src /tmp/src | ||
COPY lib /tmp/lib | ||
COPY lib/oci-java-sdk-generativeai-3.25.1-preview1-20230906.204234-1.jar /tmp/lib/oci-java-sdk-generativeai-3.25.1-preview1-20230906.204234-1.jar | ||
WORKDIR /tmp/ | ||
|
||
ENTRYPOINT ["java", "-jar", "/usr/share/oracleai/oracleai.jar"] | ||
RUN mvn org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file -Dfile=/tmp/lib/oci-java-sdk-generativeai-3.25.1-preview1-20230906.204234-1.jar | ||
RUN mvn -f /tmp/pom.xml clean package | ||
|
||
ADD target/oracleai-0.0.1-SNAPSHOT.jar /usr/share/oracleai/oracleai.jar | ||
FROM openjdk | ||
EXPOSE 8080 | ||
|
||
CMD ls /tmp | ||
COPY --from=maven_build /tmp/target/oracleai-0.0.1-SNAPSHOT.jar /app/oracleai-0.0.1-SNAPSHOT.jar | ||
ENTRYPOINT ["java","-jar","/app/oracleai-0.0.1-SNAPSHOT.jar"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
#!/bin/bash | ||
|
||
source env.properties | ||
|
||
#The following is temporary until release is available in maven and only required to be called once... | ||
mvn org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file -Dfile=lib/oci-java-sdk-generativeai-3.25.1-preview1-20230906.204234-1.jar | ||
mvn clean package |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/bin/bash | ||
|
||
#source ~/Downloads/env.properties | ||
source env.properties | ||
export `cat env.properties` | ||
#export `cat ~/Downloads/env.properties` | ||
|
||
mvn clean package ; java -Djava.security.debug="access,failure" -jar target/oracleai-0.0.1-SNAPSHOT.jar | ||
mvn clean package ; java -jar target/oracleai-0.0.1-SNAPSHOT.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
|
||
export IMAGE_NAME=oracleai | ||
export IMAGE_VERSION=0.1 | ||
|
||
|
||
if [ -z "$DOCKER_REGISTRY" ]; then | ||
echo "DOCKER_REGISTRY not set. Will set it to 'test" | ||
export DOCKER_REGISTRY=test | ||
fi | ||
|
||
export IMAGE=${DOCKER_REGISTRY}/${IMAGE_NAME}:${IMAGE_VERSION} | ||
|
||
docker build -t=$IMAGE . | ||
|
||
#docker push "$IMAGE" | ||
#if [ $? -eq 0 ]; then | ||
# docker rmi "$IMAGE" | ||
#fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,11 @@ | ||
#!/bin/bash | ||
|
||
## Add exports here... For example... | ||
#export COHERE_KEY="mykeyvalue" | ||
#export OPENAI_KEY="mykeyvalue" | ||
#export OCICONFIG_FILE=~/.oci/config | ||
#export OCICONFIG_PROFILE=DEFAULT | ||
#only set region to override the default found in OCI config, eg if using a feature only avaiable in a certain region | ||
#export REGION="US_CHICAGO_1" | ||
#export COMPARTMENT_ID="ocid1.compartment.oc1..mycompartmentvalue" | ||
#export OBJECTSTORAGE_NAMESPACE="myobjectstorenamespacename" | ||
#export OBJECTSTORAGE_BUCKETNAME="myobjectstorebucketname" | ||
#export ORDS_ENDPOINT_URL="myordsendpointurl" | ||
#export OCI_VISION_SERVICE_ENDPOINT="https://vision.aiservice.myregion.oci.oraclecloud.com" | ||
#export OCI_SPEECH_SERVICE_ENDPOINT="https://speech.aiservice.myregion.oci.oraclecloud.com" | ||
#export OCI_GENAI_SERVICE_ENDPOINT="https://genai.aiservice.us-chicago-1.oci.oraclecloud.com" | ||
|
||
## The following are only applicable when using Kubernetes... | ||
#export KUBECONFIG=~/.kube/config-mykubeconfig | ||
#export DOCKER_REGISTRY=us-myregion-1.ocir.io/myocirnamespacename/myocirfolder | ||
|
||
OCICONFIG_FILE=~/.oci/config | ||
OCICONFIG_PROFILE=DEFAULT | ||
COMPARTMENT_ID=ocid1.compartment.oc1..mycompartmentvalue | ||
OBJECTSTORAGE_NAMESPACE=myobjectstorenamespacename | ||
OBJECTSTORAGE_BUCKETNAME=myobjectstorebucketname | ||
ORDS_ENDPOINT_URL=https://myordsendpointurl | ||
ORDS_ENDPOINT_URL=https://rddainsuh6u1okc-aidatabaseworkshop.adb.us-ashburn-1.oraclecloudapps.com/ords/aiuser/_sdw/ | ||
OCI_VISION_SERVICE_ENDPOINT=https://vision.aiservice.myregion.oci.oraclecloud.com | ||
OCI_SPEECH_SERVICE_ENDPOINT=https://speech.aiservice.myregion.oci.oraclecloud.com | ||
OCI_GENAI_SERVICE_ENDPOINT=https://genai.aiservice.us-chicago-1.oci.oraclecloud.com | ||
OPENAI_KEY=mykeyfordalleifused |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/bash | ||
|
||
source env.properties | ||
export `cat env.properties` | ||
|
||
mvn clean package ; java -jar target/oracleai-0.0.1-SNAPSHOT.jar | ||
java -jar target/oracleai-0.0.1-SNAPSHOT.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
export IMAGE_NAME=oracleai | ||
export IMAGE_VERSION=0.1 | ||
|
||
|
||
if [ -z "$DOCKER_REGISTRY" ]; then | ||
echo "DOCKER_REGISTRY not set. Will set it to 'test" | ||
export DOCKER_REGISTRY=test | ||
fi | ||
|
||
export IMAGE=${DOCKER_REGISTRY}/${IMAGE_NAME}:${IMAGE_VERSION} | ||
|
||
docker run --env-file env.properties -p 127.0.0.1:8080:8080/tcp $IMAGE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
--run as admin | ||
|
||
CREATE USER aiuser identified BY [Yourpassword]; | ||
grant CREATE session TO aiuser; | ||
grant RESOURCE, db_developer_role TO aiuser; | ||
grant RESOURCE TO aiuser; | ||
grant unlimited tablespace TO aiuser; | ||
grant EXECUTE ON javascript TO aiuser; | ||
grant EXECUTE dynamic mle TO aiuser; | ||
grant execute on DBMS_CLOUD to aiuser; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.