-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
173 lines (114 loc) · 4.16 KB
/
Dockerfile
File metadata and controls
173 lines (114 loc) · 4.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# 1337.to
# movie name and add mkv look through
#FROM python:3.10
# FROM python:3.10.11-slim
# WORKDIR /src
# COPY . /src
# # RUN apt-get update && apt-get install -y python3-opencv
# # RUN apt-get update && apt-get install -y python3-opencv
# RUN pip install opencv-python
# RUN apt-get update && apt-get install -y \
# libmagickwand-dev \
# --no-install-recommends
# #RUN apt-get update && apt-get install ffmpeg libsm6 libxext6 -y
# RUN pip install -r requirements.txt
# #entry point
# CMD ["python", "lambda_function.py"]
#============================================================================
# FROM python:3.10.11-slim AS base
# COPY . ./
# RUN apt-get update && apt-get install -y python3-opencv
# RUN pip install opencv-python
# RUN apt-get update && apt-get install -y \
# libmagickwand-dev \
# --no-install-recommends
# RUN pip install -r requirements.txt
# #FROM python:3.10.11-alpine
# FROM python:3.10.11-slim
# COPY --from=base . /src
# WORKDIR /src
# #entry point
# CMD ["python", "lambda_function.py"]
# # # CMD ["python", "gui.py"]
#============================================================================
# FROM python:3.10.11-slim
# WORKDIR /src
# COPY . /src
# RUN pip install opencv-python
# RUN apt-get update && apt-get install -y \
# libmagickwand-dev \
# --no-install-recommends
# RUN pip install -r requirements.txt
# #entry point
# CMD ["lambda_function.lambda_handler"]
#===================================================
# FROM python:3.10.11-slim
# WORKDIR /src
# COPY . /src
# # Install system dependencies
# RUN apt-get -y update && apt-get install -y
# #apt-transport-https\
# # libmagickwand-dev \
# # --no-install-recommends \
# # && rm -rf /var/lib/apt/lists/*
# # Install Python dependencies
# RUN pip install -r requirements.txt \
# && rm -rf /var/lib/apt/lists/*
# # Entry point
# CMD ["lambda_function.lambda_handler"]
#=================================================
# FROM public.ecr.aws/lambda/python:3.10
# WORKDIR /src
# COPY . /src
# # Install system dependencies
# RUN yum -y update && yum -y install python-pip
# #apt-transport-https\
# # libmagickwand-dev \
# # --no-install-recommends \
# # && rm -rf /var/lib/apt/lists/*
# # Install Python dependencies
# RUN pip install -r requirements.txt \
# && rm -rf /var/lib/apt/lists/*
# # Entry point
# CMD ["lambda_function.lambda_handler"]
#===============================
# #Install Python dependencies
# RUN yum -y update \
# && yum -y install python-pip \
# && yum clean all \
# && pip install --no-cache-dir -r requirements.txt \
# && rm -rf /var/lib/apt/lists/*
# RUN yum -y update \
# && yum -y install wget \
# && yum -y install xz \
# && yum install -y tar.x86_64 \
# && wget -O ffmpeg.tar.xz https://johnvansickle.com/ffmpeg/builds/ffmpeg-git-amd64-static.tar.xz \
# && tar xvf ffmpeg.tar.xz \
# && yum -y install python-pip \
# && yum clean all \
# && pip install --no-cache-dir -r requirements.txt \
# && rm -rf /var/lib/apt/lists/*
# RUN yum -y update \
# && yum -y install python-pip \
# && yum clean all \
# && pip install --no-cache-dir -r requirements.txt \
# && rm -rf /var/lib/apt/lists/*
# RUN yum -y update\
# && yum -y install python-pip\
# && pip install --no-cache-dir -r requirements.txt
# FROM public.ecr.aws/lambda/python:3.10
# COPY src/* ${LAMBDA_TASK_ROOT}
# COPY ffmpeg-6.1-amd64-static /usr/local/bin/ffmpeg
# RUN chmod 777 -R /usr/local/bin/ffmpeg
FROM public.ecr.aws/lambda/python:3.10
COPY src/* ${LAMBDA_TASK_ROOT}
#Install Python dependencies
RUN yum -y update \
&& yum -y install tar xz \
&& yum -y install python-pip \
&& yum clean all
RUN curl https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz > /tmp/ffmpeg-release.tar.xz && tar xvf /tmp/ffmpeg-release.tar.xz -C /opt && mv /opt/ffmpeg-* /opt/ffmpeg && cd /opt/ffmpeg && mv model /usr/local/share && mv ffmpeg ffprobe qt-faststart /usr/local/bin && rm /tmp/ffmpeg-release.tar.xz
RUN pip install --no-cache-dir -r requirements.txt \
&& rm -rf /var/lib/apt/lists/*
# Entry point
CMD ["lambda_function.lambda_handler"]