|
770 | 770 | "InferencePipelineModelRoleDefaultPolicy2AF0CDCF",
|
771 | 771 | "InferencePipelineModelRole6A99C5B3"
|
772 | 772 | ]
|
| 773 | + }, |
| 774 | + "HuggingFaceModelRoleDA17DA00": { |
| 775 | + "Type": "AWS::IAM::Role", |
| 776 | + "Properties": { |
| 777 | + "AssumeRolePolicyDocument": { |
| 778 | + "Statement": [ |
| 779 | + { |
| 780 | + "Action": "sts:AssumeRole", |
| 781 | + "Effect": "Allow", |
| 782 | + "Principal": { |
| 783 | + "Service": "sagemaker.amazonaws.com" |
| 784 | + } |
| 785 | + } |
| 786 | + ], |
| 787 | + "Version": "2012-10-17" |
| 788 | + }, |
| 789 | + "ManagedPolicyArns": [ |
| 790 | + { |
| 791 | + "Fn::Join": [ |
| 792 | + "", |
| 793 | + [ |
| 794 | + "arn:", |
| 795 | + { |
| 796 | + "Ref": "AWS::Partition" |
| 797 | + }, |
| 798 | + ":iam::aws:policy/AmazonSageMakerFullAccess" |
| 799 | + ] |
| 800 | + ] |
| 801 | + } |
| 802 | + ] |
| 803 | + } |
| 804 | + }, |
| 805 | + "HuggingFaceModelRoleDefaultPolicy50587D35": { |
| 806 | + "Type": "AWS::IAM::Policy", |
| 807 | + "Properties": { |
| 808 | + "PolicyDocument": { |
| 809 | + "Statement": [ |
| 810 | + { |
| 811 | + "Action": [ |
| 812 | + "ecr:BatchCheckLayerAvailability", |
| 813 | + "ecr:BatchGetImage", |
| 814 | + "ecr:GetDownloadUrlForLayer" |
| 815 | + ], |
| 816 | + "Effect": "Allow", |
| 817 | + "Resource": { |
| 818 | + "Fn::Join": [ |
| 819 | + "", |
| 820 | + [ |
| 821 | + "arn:", |
| 822 | + { |
| 823 | + "Ref": "AWS::Partition" |
| 824 | + }, |
| 825 | + ":ecr:", |
| 826 | + { |
| 827 | + "Ref": "AWS::Region" |
| 828 | + }, |
| 829 | + ":", |
| 830 | + { |
| 831 | + "Fn::FindInMap": [ |
| 832 | + "DlcRepositoryAccountMap", |
| 833 | + { |
| 834 | + "Ref": "AWS::Region" |
| 835 | + }, |
| 836 | + "value" |
| 837 | + ] |
| 838 | + }, |
| 839 | + ":repository/huggingface-pytorch-training" |
| 840 | + ] |
| 841 | + ] |
| 842 | + } |
| 843 | + }, |
| 844 | + { |
| 845 | + "Action": "ecr:GetAuthorizationToken", |
| 846 | + "Effect": "Allow", |
| 847 | + "Resource": "*" |
| 848 | + } |
| 849 | + ], |
| 850 | + "Version": "2012-10-17" |
| 851 | + }, |
| 852 | + "PolicyName": "HuggingFaceModelRoleDefaultPolicy50587D35", |
| 853 | + "Roles": [ |
| 854 | + { |
| 855 | + "Ref": "HuggingFaceModelRoleDA17DA00" |
| 856 | + } |
| 857 | + ] |
| 858 | + } |
| 859 | + }, |
| 860 | + "HuggingFaceModel8E13DAA5": { |
| 861 | + "Type": "AWS::SageMaker::Model", |
| 862 | + "Properties": { |
| 863 | + "ExecutionRoleArn": { |
| 864 | + "Fn::GetAtt": [ |
| 865 | + "HuggingFaceModelRoleDA17DA00", |
| 866 | + "Arn" |
| 867 | + ] |
| 868 | + }, |
| 869 | + "PrimaryContainer": { |
| 870 | + "Image": { |
| 871 | + "Fn::Join": [ |
| 872 | + "", |
| 873 | + [ |
| 874 | + { |
| 875 | + "Fn::FindInMap": [ |
| 876 | + "DlcRepositoryAccountMap", |
| 877 | + { |
| 878 | + "Ref": "AWS::Region" |
| 879 | + }, |
| 880 | + "value" |
| 881 | + ] |
| 882 | + }, |
| 883 | + ".dkr.ecr.", |
| 884 | + { |
| 885 | + "Ref": "AWS::Region" |
| 886 | + }, |
| 887 | + ".", |
| 888 | + { |
| 889 | + "Ref": "AWS::URLSuffix" |
| 890 | + }, |
| 891 | + "/huggingface-pytorch-training:1.13.1-transformers4.26.0-gpu-py39-cu117-ubuntu20.04" |
| 892 | + ] |
| 893 | + ] |
| 894 | + } |
| 895 | + } |
| 896 | + }, |
| 897 | + "DependsOn": [ |
| 898 | + "HuggingFaceModelRoleDefaultPolicy50587D35", |
| 899 | + "HuggingFaceModelRoleDA17DA00" |
| 900 | + ] |
| 901 | + } |
| 902 | + }, |
| 903 | + "Mappings": { |
| 904 | + "DlcRepositoryAccountMap": { |
| 905 | + "ap-east-1": { |
| 906 | + "value": "871362719292" |
| 907 | + }, |
| 908 | + "ap-northeast-1": { |
| 909 | + "value": "763104351884" |
| 910 | + }, |
| 911 | + "ap-northeast-2": { |
| 912 | + "value": "763104351884" |
| 913 | + }, |
| 914 | + "ap-south-1": { |
| 915 | + "value": "763104351884" |
| 916 | + }, |
| 917 | + "ap-southeast-1": { |
| 918 | + "value": "763104351884" |
| 919 | + }, |
| 920 | + "ap-southeast-2": { |
| 921 | + "value": "763104351884" |
| 922 | + }, |
| 923 | + "ca-central-1": { |
| 924 | + "value": "763104351884" |
| 925 | + }, |
| 926 | + "cn-north-1": { |
| 927 | + "value": "727897471807" |
| 928 | + }, |
| 929 | + "cn-northwest-1": { |
| 930 | + "value": "727897471807" |
| 931 | + }, |
| 932 | + "eu-central-1": { |
| 933 | + "value": "763104351884" |
| 934 | + }, |
| 935 | + "eu-north-1": { |
| 936 | + "value": "763104351884" |
| 937 | + }, |
| 938 | + "eu-west-1": { |
| 939 | + "value": "763104351884" |
| 940 | + }, |
| 941 | + "eu-west-2": { |
| 942 | + "value": "763104351884" |
| 943 | + }, |
| 944 | + "eu-west-3": { |
| 945 | + "value": "763104351884" |
| 946 | + }, |
| 947 | + "me-south-1": { |
| 948 | + "value": "217643126080" |
| 949 | + }, |
| 950 | + "sa-east-1": { |
| 951 | + "value": "763104351884" |
| 952 | + }, |
| 953 | + "us-east-1": { |
| 954 | + "value": "763104351884" |
| 955 | + }, |
| 956 | + "us-east-2": { |
| 957 | + "value": "763104351884" |
| 958 | + }, |
| 959 | + "us-west-1": { |
| 960 | + "value": "763104351884" |
| 961 | + }, |
| 962 | + "us-west-2": { |
| 963 | + "value": "763104351884" |
| 964 | + } |
773 | 965 | }
|
774 | 966 | },
|
775 | 967 | "Parameters": {
|
|
0 commit comments