Spaces:
Paused
Paused
Gor Solomon
commited on
Commit
·
eca106d
1
Parent(s):
18c9d3d
fix 2
Browse files- Dockerfile +11 -19
- requirements.txt +0 -0
Dockerfile
CHANGED
@@ -1,24 +1,16 @@
|
|
1 |
-
#
|
2 |
-
|
3 |
|
4 |
-
|
5 |
-
ENV CONDA_ENV_NAME=myenv
|
6 |
-
ENV PATH /opt/conda/envs/${CONDA_ENV_NAME}/bin:$PATH
|
7 |
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
&& conda clean --all --yes
|
12 |
|
13 |
-
# Copy requirements file and install pip packages
|
14 |
-
COPY requirements.txt /app/requirements.txt
|
15 |
-
RUN /opt/conda/envs/${CONDA_ENV_NAME}/bin/pip install --no-cache-dir --upgrade -r /app/requirements.txt
|
16 |
-
|
17 |
-
# Copy your application code
|
18 |
-
COPY . /app
|
19 |
-
|
20 |
-
# Set working directory
|
21 |
WORKDIR /app
|
22 |
|
23 |
-
|
24 |
-
|
|
|
|
|
|
|
|
1 |
+
# read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
|
2 |
+
# you will also find guides on how best to write your Dockerfile
|
3 |
|
4 |
+
FROM python:3.12.4
|
|
|
|
|
5 |
|
6 |
+
RUN useradd -m -u 1000 user
|
7 |
+
USER user
|
8 |
+
ENV PATH="/home/user/.local/bin:$PATH"
|
|
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
WORKDIR /app
|
11 |
|
12 |
+
COPY --chown=user ./requirements.txt requirements.txt
|
13 |
+
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
14 |
+
|
15 |
+
COPY --chown=user . /app
|
16 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
requirements.txt
CHANGED
Binary files a/requirements.txt and b/requirements.txt differ
|
|