-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
232 additions
and
19 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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# docker build --no-cache --progress=plain -t caravanacloud/$(basename $PWD) -f Containerfile . | ||
FROM fedora | ||
|
||
# System Updates | ||
# RUN bash -c "sudo dnf -y update" | ||
RUN bash -c "sudo dnf -y install unzip zip pipx wget python3 python3-pip" | ||
|
||
# AWS CLIs | ||
RUN bash -c "curl 'https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip' -o 'awscliv2.zip' && unzip awscliv2.zip \ | ||
&& sudo ./aws/install \ | ||
&& aws --version \ | ||
" | ||
|
||
# RUN bash -c "npm install -g aws-cdk" | ||
|
||
# ARG SAM_URL="https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-linux-x86_64.zip" | ||
# RUN bash -c "curl -Ls '${SAM_URL}' -o '/tmp/aws-sam-cli-linux-x86_64.zip' \ | ||
# && unzip '/tmp/aws-sam-cli-linux-x86_64.zip' -d '/tmp/sam-installation' \ | ||
# && sudo '/tmp/sam-installation/install' \ | ||
# && sam --version" | ||
|
||
# RUN bash -c "pip install cloudformation-cli cloudformation-cli-java-plugin cloudformation-cli-go-plugin cloudformation-cli-python-plugin cloudformation-cli-typescript-plugin" | ||
|
||
# COPY | ||
# Creates user up_user inside container | ||
ARG USER=up_user | ||
ARG UID=1000 | ||
ARG GID=1000 | ||
RUN groupadd -g $GID $USER && \ | ||
useradd -l -u $UID -g $USER -m -d /home/$USER $USER && \ | ||
chown -R $USER:$USER /home/$USER | ||
|
||
USER up_user | ||
# Python Poetry | ||
RUN bash -c "pipx install poetry && python3 -m pipx ensurepath" | ||
RUN bash -c "/home/up_user/.local/bin/poetry --version" | ||
|
||
COPY ./opt /opt | ||
# RUN bash -c "find /opt" | ||
|
||
# Done :) | ||
RUN bash -c "echo 'done.'" | ||
|
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 @@ | ||
This is some sample code to run inside the container |
Empty file.
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 @@ | ||
def subs(): | ||
print("*** Generating Subtitles using AWS ***") | ||
print("* Validate credentials (sts get client identity)") | ||
print("* Find files to translate (python glob)") | ||
print("* Find or create data bucket (aws s3)") | ||
print("* Upload videos to bucket (aws s3)") | ||
print("* Start and wait transcribe job") | ||
print("* Start and wait translate job") | ||
print("* Download translated subtitles") | ||
print("* ...") | ||
|
||
#main invoke | ||
if __name__ == "__main__": | ||
main() |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[tool.poetry] | ||
name = "aws-utils" | ||
version = "0.1.0" | ||
description = "" | ||
authors = ["Julio Faerman <[email protected]>"] | ||
readme = "README.md" | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.12" | ||
boto3 = "^1.29.2" | ||
|
||
|
||
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
||
[tool.poetry.scripts] | ||
subs = "aws_utils.subs:subs" |
Empty file.
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 |
---|---|---|
|
@@ -13,3 +13,5 @@ python = "^3.12" | |
[build-system] | ||
requires = ["poetry-core"] | ||
build-backend = "poetry.core.masonry.api" | ||
|
||
|
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
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