Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +16 -14
Dockerfile
CHANGED
@@ -1,21 +1,23 @@
|
|
1 |
-
FROM
|
2 |
|
3 |
-
#
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
RUN winget install python
|
9 |
-
RUN winget install ffmpeg
|
10 |
-
RUN winget install MiKTeX.MiKTeX
|
11 |
|
|
|
12 |
COPY ./requirements.txt requirements.txt
|
13 |
-
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
14 |
|
15 |
-
|
|
|
16 |
|
17 |
# (Optional) Set permissions for the newly created directory
|
18 |
-
RUN
|
|
|
|
|
|
|
19 |
|
20 |
-
|
21 |
-
CMD ["
|
|
|
1 |
+
FROM mcr.microsoft.com/windows/servercore:ltsc2022
|
2 |
|
3 |
+
# Install necessary dependencies using winget
|
4 |
+
RUN powershell -Command \
|
5 |
+
winget install --id=python.Python.3 --source=winget -e --silent; \
|
6 |
+
winget install --id=ffmpeg.FFmpeg -e --silent; \
|
7 |
+
winget install --id=MiKTeX.MiKTeX -e --silent
|
|
|
|
|
|
|
8 |
|
9 |
+
# Install Python dependencies
|
10 |
COPY ./requirements.txt requirements.txt
|
11 |
+
RUN python -m pip install --no-cache-dir --upgrade -r requirements.txt
|
12 |
|
13 |
+
# Create media directory
|
14 |
+
RUN mkdir C:/app/media
|
15 |
|
16 |
# (Optional) Set permissions for the newly created directory
|
17 |
+
RUN icacls C:/app/media /grant Everyone:F /T
|
18 |
+
|
19 |
+
# Copy application code into the container
|
20 |
+
COPY . C:/app
|
21 |
|
22 |
+
# Set the entrypoint for the application
|
23 |
+
CMD ["C:/Python39/python.exe", "C:/app/app.py"]
|