Sanket17 commited on
Commit
94a71bc
·
verified ·
1 Parent(s): 40e5362

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +27 -25
Dockerfile CHANGED
@@ -1,25 +1,27 @@
1
- # For more information, please refer to https://aka.ms/vscode-docker-python
2
- FROM python:3-slim
3
-
4
- EXPOSE 5002
5
-
6
- # Keeps Python from generating .pyc files in the container
7
- ENV PYTHONDONTWRITEBYTECODE=1
8
-
9
- # Turns off buffering for easier container logging
10
- ENV PYTHONUNBUFFERED=1
11
-
12
- # Install pip requirements
13
- COPY requirements.txt .
14
- RUN python -m pip install -r requirements.txt
15
-
16
- WORKDIR /app
17
- COPY . /app
18
-
19
- # Creates a non-root user with an explicit UID and adds permission to access the /app folder
20
- # For more info, please refer to https://aka.ms/vscode-docker-python-configure-containers
21
- RUN adduser -u 5678 --disabled-password --gecos "" appuser && chown -R appuser /app
22
- USER appuser
23
-
24
- # During debugging, this entry point will be overridden. For more information, please refer to https://aka.ms/vscode-docker-python-debug
25
- CMD ["gunicorn", "--bind", "0.0.0.0:5002", "weights.convert_safetensor_to_pt:app"]
 
 
 
1
+ # For more information, please refer to https://aka.ms/vscode-docker-python
2
+ FROM python:3-slim
3
+
4
+ EXPOSE 5002
5
+
6
+ # Keeps Python from generating .pyc files in the container
7
+ ENV PYTHONDONTWRITEBYTECODE=1
8
+
9
+ # Turns off buffering for easier container logging
10
+ ENV PYTHONUNBUFFERED=1
11
+
12
+ # Install pip requirements
13
+ COPY requirements.txt .
14
+ RUN python -m pip install -r requirements.txt
15
+
16
+ RUN apt-get update && apt-get install -y libgl1-mesa-glx
17
+
18
+ WORKDIR /app
19
+ COPY . /app
20
+
21
+ # Creates a non-root user with an explicit UID and adds permission to access the /app folder
22
+ # For more info, please refer to https://aka.ms/vscode-docker-python-configure-containers
23
+ RUN adduser -u 5678 --disabled-password --gecos "" appuser && chown -R appuser /app
24
+ USER appuser
25
+
26
+ # During debugging, this entry point will be overridden. For more information, please refer to https://aka.ms/vscode-docker-python-debug
27
+ CMD ["gunicorn", "--bind", "0.0.0.0:5002", "weights.convert_safetensor_to_pt:app"]