yashxx07 commited on
Commit
6b01870
·
verified ·
1 Parent(s): a5f0d3d

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +16 -14
Dockerfile CHANGED
@@ -1,21 +1,23 @@
1
- FROM winamd64/python:3
2
 
3
- #ENV PATH="/home/user/.local/bin:$PATH"
4
-
5
- WORKDIR /app
6
-
7
- # Install necessary dependencies with apk
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
- RUN mkdir -p /app/media
 
16
 
17
  # (Optional) Set permissions for the newly created directory
18
- RUN chmod -R 777 /app/media
 
 
 
19
 
20
- COPY . /app
21
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
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"]