Feriel080 commited on
Commit
4f1819c
·
verified ·
1 Parent(s): 433344e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +26 -26
Dockerfile CHANGED
@@ -1,27 +1,27 @@
1
- FROM python:3.9.11
2
-
3
- RUN useradd -m -u 1000 user
4
- USER user
5
-
6
- # Set the working directory
7
- WORKDIR /home/user/app
8
-
9
- # Set environment variables
10
- ENV HOME=/home/user \
11
- PATH=/home/user/.local/bin:$PATH \
12
- TRANSFORMERS_CACHE=/home/user/.cache/huggingface
13
-
14
- # Copy the requirements file
15
- COPY --chown=user ./requirements.txt .
16
-
17
- # Install dependencies
18
- RUN pip install --no-cache-dir --upgrade --user -r requirements.txt
19
-
20
- # Copy the rest of the application
21
- COPY --chown=user:user . .
22
-
23
- # Expose the port the app runs on
24
- EXPOSE 7860
25
-
26
- # Command to run the application
27
  CMD ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ FROM python:3.9.11
2
+
3
+ RUN useradd -m -u 1000 user
4
+ USER user
5
+
6
+ # Set the working directory
7
+ WORKDIR /home/user/app
8
+
9
+ # Set environment variables
10
+ ENV HOME=/home/user \
11
+ PATH=/home/user/.local/bin:$PATH \
12
+ HF_HOME=/home/user/.cache/huggingface
13
+
14
+ # Copy the requirements file
15
+ COPY --chown=user ./requirements.txt .
16
+
17
+ # Install dependencies
18
+ RUN pip install --no-cache-dir --upgrade --user -r requirements.txt
19
+
20
+ # Copy the rest of the application
21
+ COPY --chown=user:user . .
22
+
23
+ # Expose the port the app runs on
24
+ EXPOSE 7860
25
+
26
+ # Command to run the application
27
  CMD ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "7860"]