Spaces:
Sleeping
Sleeping
add in user auth; venv
Browse files- Dockerfile +9 -3
Dockerfile
CHANGED
@@ -17,7 +17,9 @@ WORKDIR /app
|
|
17 |
# COPY --chown=user . $HOME/app
|
18 |
|
19 |
RUN --mount=type=secret,id=LICENSE_KEY,mode=0444,required=true \
|
20 |
-
|
|
|
|
|
21 |
&& pip install prodigy -f https://$(cat /run/secrets/LICENSE_KEY)@download.prodi.gy
|
22 |
# && pip install --trusted-host pypi.python.org -r requirements.txt
|
23 |
# COPY wheel/prodigy-xxx-linux_x86_64.whl ./wheel/
|
@@ -33,8 +35,12 @@ COPY data ./data/
|
|
33 |
ENV PRODIGY_HOME /app
|
34 |
ENV PRODIGY_LOGGING "verbose"
|
35 |
ENV PRODIGY_ALLOWED_SESSIONS "user1,user2"
|
36 |
-
|
37 |
-
|
|
|
|
|
|
|
|
|
38 |
|
39 |
EXPOSE 7860
|
40 |
|
|
|
17 |
# COPY --chown=user . $HOME/app
|
18 |
|
19 |
RUN --mount=type=secret,id=LICENSE_KEY,mode=0444,required=true \
|
20 |
+
python -m venv venv \
|
21 |
+
&& source venv/bin/activate \
|
22 |
+
&& pip install --upgrade pip \
|
23 |
&& pip install prodigy -f https://$(cat /run/secrets/LICENSE_KEY)@download.prodi.gy
|
24 |
# && pip install --trusted-host pypi.python.org -r requirements.txt
|
25 |
# COPY wheel/prodigy-xxx-linux_x86_64.whl ./wheel/
|
|
|
35 |
ENV PRODIGY_HOME /app
|
36 |
ENV PRODIGY_LOGGING "verbose"
|
37 |
ENV PRODIGY_ALLOWED_SESSIONS "user1,user2"
|
38 |
+
|
39 |
+
RUN --mount=type=secret,id=AUTH_USER,mode=0444,required=true \
|
40 |
+
ENV PRODIGY_BASIC_AUTH_USER $(cat /run/secrets/AUTH_USER)
|
41 |
+
|
42 |
+
RUN --mount=type=secret,id=AUTH_PASS,mode=0444,required=true \
|
43 |
+
ENV PRODIGY_BASIC_AUTH_PASS $(cat /run/secrets/AUTH_PASS)
|
44 |
|
45 |
EXPOSE 7860
|
46 |
|