Spaces:
Sleeping
Sleeping
h3110Fr13nd
commited on
Commit
•
5ac205b
1
Parent(s):
bdbc7f2
env
Browse files- Dockerfile +2 -2
- main.py +3 -1
Dockerfile
CHANGED
@@ -28,7 +28,7 @@ RUN --mount=type=secret,id=HF_PASS,mode=0444,required=true \
|
|
28 |
echo "HF_PASS=\"$(cat /run/secrets/HF_PASS)\"" >> $HOME/app/.env &&\
|
29 |
cat $HOME/app/.env
|
30 |
RUN chown user:user $HOME/app/.env
|
31 |
-
|
32 |
-
|
33 |
EXPOSE 7860
|
34 |
CMD ["python", "main.py"]
|
|
|
28 |
echo "HF_PASS=\"$(cat /run/secrets/HF_PASS)\"" >> $HOME/app/.env &&\
|
29 |
cat $HOME/app/.env
|
30 |
RUN chown user:user $HOME/app/.env
|
31 |
+
RUN chmod 666 $HOME/app/.env
|
32 |
+
RUN ls -la $HOME/app/.env
|
33 |
EXPOSE 7860
|
34 |
CMD ["python", "main.py"]
|
main.py
CHANGED
@@ -24,10 +24,12 @@ from langchain_community.chat_models import ChatOllama
|
|
24 |
# from hugchat.login import Login
|
25 |
langchain.debug = True
|
26 |
|
27 |
-
dotenv.load_dotenv()
|
28 |
|
29 |
print(os.environ.get("HF_EMAIL"))
|
30 |
print(os.environ.get("HF_PASS"))
|
|
|
|
|
31 |
|
32 |
class GradioApp:
|
33 |
def __init__(self):
|
|
|
24 |
# from hugchat.login import Login
|
25 |
langchain.debug = True
|
26 |
|
27 |
+
dotenv.load_dotenv(".env", override=True)
|
28 |
|
29 |
print(os.environ.get("HF_EMAIL"))
|
30 |
print(os.environ.get("HF_PASS"))
|
31 |
+
print(os.getenv("HF_EMAIL"))
|
32 |
+
print(os.getenv("HF_PASS"))
|
33 |
|
34 |
class GradioApp:
|
35 |
def __init__(self):
|