Spaces:
Paused
Paused
Create Dockerfile
Browse files- Dockerfile +29 -0
Dockerfile
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.9
|
2 |
+
|
3 |
+
ARG DEBIAN_FRONTEND=noninteractive
|
4 |
+
|
5 |
+
RUN apt-get update && apt-get install --no-install-recommends -y \
|
6 |
+
build-essential \
|
7 |
+
python3-pip \
|
8 |
+
git \
|
9 |
+
ffmpeg \
|
10 |
+
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
11 |
+
|
12 |
+
WORKDIR /code
|
13 |
+
|
14 |
+
COPY ./requirements.txt /code/requirements.txt
|
15 |
+
|
16 |
+
# For hugging face
|
17 |
+
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
18 |
+
|
19 |
+
# Set up user and environment
|
20 |
+
RUN useradd -m -u 1000 user
|
21 |
+
USER user
|
22 |
+
ENV HOME=/home/user \
|
23 |
+
PATH=/home/user/.local/bin:$PATH
|
24 |
+
|
25 |
+
# Set working directory
|
26 |
+
WORKDIR $HOME/app
|
27 |
+
|
28 |
+
# Copy the application files into the container
|
29 |
+
COPY --chown=user . $HOME/app
|