Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recommandation #1

Open
genwch opened this issue Jul 17, 2024 · 1 comment
Open

Recommandation #1

genwch opened this issue Jul 17, 2024 · 1 comment

Comments

@genwch
Copy link

genwch commented Jul 17, 2024

Environment Variables for Initialization:
I recommend using environment variables to initialize the following parameters when using lm-studio:
API_URL: The URL for the API you’re interacting with.
API_KEY: Your API key for authentication.
model: The specific model you want to use.

Listening on 0.0.0.0:
To make the Flask application listen on all available network interfaces, set the host to 0.0.0.0 in your Flask app configuration.

Docker release:
build the Dockerfile and use CI/CD to make the docker image release.

recommended Dockerfile

# Use the official Python image as the base
FROM python:3.9

# Set environment variable for API_URL (default value)
ENV LMSTUDIO_URL="http://localhost:1234/v1"
ENV LMSTUDIO_KEY="lm-studio"
ENV LMSTUDIO_MODEL="model-identifier"

# Set working directory
WORKDIR /app

# Copy requirements file and install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy your Python code into the container
COPY . .

# Expose port 5000 (assuming your app runs on this port)
EXPOSE 5000

# Command to run your app
CMD ["python", "main.py", "lmstudio"]

@VectorsCrib
Copy link
Owner

Thank you. I will commit the Dockerfile in a bit. This will help the ease of installation. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants