Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +26 -13
Dockerfile
CHANGED
@@ -1,23 +1,36 @@
|
|
1 |
# Use the official Python 3.10.4 image
|
2 |
FROM python:3.10.4
|
3 |
|
4 |
-
|
5 |
-
|
|
|
|
|
6 |
|
7 |
-
|
8 |
-
RUN apt-get update \
|
9 |
-
&& apt-get -y install ffmpeg
|
10 |
|
11 |
-
|
12 |
-
WORKDIR backend/
|
13 |
|
14 |
-
|
15 |
-
RUN pip install --no-cache-dir --upgrade -r ./requirements.txt
|
16 |
-
RUN pip install git+https://github.com/huggingface/transformers.git
|
17 |
-
RUN pip install pydantic[email]
|
18 |
|
19 |
-
|
20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
|
22 |
RUN python3 main.py
|
23 |
|
|
|
1 |
# Use the official Python 3.10.4 image
|
2 |
FROM python:3.10.4
|
3 |
|
4 |
+
RUN useradd -m -u 1000 user
|
5 |
+
USER user
|
6 |
+
ENV HOME=/home/user \
|
7 |
+
PATH=/home/user/.local/bin:$PATH
|
8 |
|
9 |
+
COPY --chown=user ./backend $HOME/backend
|
|
|
|
|
10 |
|
11 |
+
WORKDIR $HOME/backend
|
|
|
12 |
|
13 |
+
RUN mkdir $HOME/.cache
|
|
|
|
|
|
|
14 |
|
15 |
+
ENV HF_HUB_HOME=/home/user/.cache
|
16 |
+
|
17 |
+
# # Copy the current directory contents into the container at .
|
18 |
+
# COPY . .
|
19 |
+
|
20 |
+
# # Install OS Libs
|
21 |
+
# RUN apt-get update \
|
22 |
+
# && apt-get -y install ffmpeg
|
23 |
+
|
24 |
+
# # Change to backend as working directory
|
25 |
+
# WORKDIR backend/
|
26 |
+
|
27 |
+
# # Install requirements.txt
|
28 |
+
# RUN pip install --no-cache-dir --upgrade -r ./requirements.txt
|
29 |
+
# RUN pip install git+https://github.com/huggingface/transformers.git
|
30 |
+
# RUN pip install pydantic[email]
|
31 |
+
|
32 |
+
# # Make all files and folders readable, writable, executable
|
33 |
+
# # RUN chmod -R 777 ./
|
34 |
|
35 |
RUN python3 main.py
|
36 |
|