Spaces:
Running
Running
Commit
·
b776c2f
1
Parent(s):
e6017d7
Try to fix permission errors
Browse filesSigned-off-by: Martín Santillán Cooper <[email protected]>
- Dockerfile +21 -3
- README.md +1 -0
Dockerfile
CHANGED
@@ -1,5 +1,23 @@
|
|
1 |
FROM python:3.12-slim
|
|
|
|
|
|
|
|
|
2 |
WORKDIR /app
|
3 |
-
|
4 |
-
|
5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
FROM python:3.12-slim
|
2 |
+
|
3 |
+
RUN groupadd --gid 1000 appuser \
|
4 |
+
&& useradd --uid 1000 --gid appuser --create-home appuser
|
5 |
+
|
6 |
WORKDIR /app
|
7 |
+
|
8 |
+
RUN chown -R appuser:appuser /app \
|
9 |
+
&& chmod -R 777 /app
|
10 |
+
|
11 |
+
USER appuser
|
12 |
+
|
13 |
+
# Create venv and install in workdir
|
14 |
+
RUN python3 -m venv venv
|
15 |
+
ENV VIRTUAL_ENV=/app/venv
|
16 |
+
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
|
17 |
+
RUN pip install --upgrade pip \
|
18 |
+
&& pip install --no-cache-dir evalassist==0.1.12
|
19 |
+
|
20 |
+
ENV STORAGE_ENABLED="false"
|
21 |
+
ENV UVICORN_WORKERS=4
|
22 |
+
|
23 |
+
CMD ["eval-assist", "serve", "--host", "0.0.0.0", "--port", "7860"]
|
README.md
CHANGED
@@ -5,6 +5,7 @@ colorFrom: purple
|
|
5 |
colorTo: purple
|
6 |
sdk: docker
|
7 |
pinned: false
|
|
|
8 |
---
|
9 |
|
10 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
5 |
colorTo: purple
|
6 |
sdk: docker
|
7 |
pinned: false
|
8 |
+
app_port: 7860
|
9 |
---
|
10 |
|
11 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|