Linux

How do I install python on alpine linux?

柔情痞子 提交于 2021-02-18 20:13:01
问题 How do I install python3 and python3-pip on an alpine based image (without using a python image)? $ apk add --update python3.8 python3-pip ERROR: unsatisfiable constraints: python3-pip (missing): required by: world[python3-pip] python3.8 (missing): required by: world[python3.8] 回答1: This is what I use in a Dockerfile for an alpine image: # Install python/pip ENV PYTHONUNBUFFERED=1 RUN apk add --update --no-cache python3 && ln -sf python3 /usr/bin/python RUN python3 -m ensurepip RUN pip3

How do I install python on alpine linux?

家住魔仙堡 提交于 2021-02-18 20:08:05
问题 How do I install python3 and python3-pip on an alpine based image (without using a python image)? $ apk add --update python3.8 python3-pip ERROR: unsatisfiable constraints: python3-pip (missing): required by: world[python3-pip] python3.8 (missing): required by: world[python3.8] 回答1: This is what I use in a Dockerfile for an alpine image: # Install python/pip ENV PYTHONUNBUFFERED=1 RUN apk add --update --no-cache python3 && ln -sf python3 /usr/bin/python RUN python3 -m ensurepip RUN pip3

Running Meteor Application on a Single Core

强颜欢笑 提交于 2021-02-18 18:56:21
问题 I am trying to run a meteor app on a remote host. The application works on my desktop, but when I run it on the remote host the meteor processes are either killed or they freeze. Here are a couple commands that are experiencing this issue: meteor meteor update meteor restart Each command is taking up about 99% of the cpu at the time of failure, so I suspect Ubuntu is killing the process. I believe that upgrading the CPU will fix these issues, but I want to get a second opinion before I buy

How do I downgrade my version of python from 3.7.5 to 3.6.5 on ubuntu

社会主义新天地 提交于 2021-02-18 18:47:54
问题 So currently, I have ubuntu 19. And it comes by default with python 3.7.5. I need to downgrade to 3.6.5. EDIT: I am using virtualenv 回答1: The following talks about upgrade from 3.6.7 to 3.7.0 but you can use the same process for downgrade. You should not change the system python unless you really know what you're doing First Install Pyenv Installlation Instructions are here Look at Pyenv Options $ pyenv pyenv 1.2.14 Usage: pyenv <command> [<args>] Some useful pyenv commands are: commands List

ZStack实践汇 | ZStack+Docker支撑GPU业务实践

自古美人都是妖i 提交于 2021-02-18 18:30:51
背景 ZStack所聚焦的IaaS,作为云计算里的底座基石,能够更好的实现物理资源隔离,以及服务器等硬件资源的统一管理,为上层大数据、深度学习Tensorflow等业务提供了稳定可靠的基础环境。 近年来,云计算发展探索出了有别于传统虚拟化、更贴近于业务的PaaS型服务,该类型依赖于docker实现,如K8S等典型的容器云,可以直接从镜像商店下载封装好业务软件的镜像,更加快捷地实现业务部署。 此外,GPU场景也是客户业务的典型场景,相比于CPU的运算特点,在数据分析、深度学习有着明显的优势。 ZStack是如何与容器结合,以IaaS+PaaS的组合拳,为上层业务提供支撑的呢?本篇文章带大家了解一下,如何在ZStack 上部署 centos7.6 虚拟机,在虚拟机里部署docker,以及如何使用nvidia-docker实现在容器里调用GPU的业务场景。 环境 虚机系统:Centos 7.6 虚机内核:Linux 172-18-47-133 3.10.0-957.el7.x86_64 #1 SMP Thu Nov 8 23:39:32 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux docker版本:docker-ce 19.03 nvidia-docker版本:nvidia-docker-1.0.11.x86_64 显卡:RTX6000 Cuda版本

使用docker部署SqlServer

荒凉一梦 提交于 2021-02-18 17:51:31
踩了很多坑,来记录一下 首先说sqlserver 1. 安装docker要使用centos 7以上版本,使用centos 6及以下版本会出现各种问题 2. docker CE安装过程 $ sudo yum install -y yum-utils device-mapper-persistent-data lvm2 $ sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo #建立仓库 $ sudo yum install docker-ce #安装docker $ sudo systemctl start docker #开启docker 3. 从 Docker Hub 中拉出 SQL Server 2017 Linux 容器映像 $ sudo docker pull microsoft/mssql-server-linux:2017-latest 4. 显示所有可用的镜像 $ docker images 5. 运行一个镜像(也就相当于使用已有的镜像创建一个实例) $ sudo docker run -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=<YourStrong!Passw0rd>' -p 1401:1433 -v

使用Docker部署MSSQL

泪湿孤枕 提交于 2021-02-18 17:51:18
部署MSSQL需要2G内存 1.下载镜像 docker pull microsoft/mssql-server-linux 使用该命令就可以把数据库的docker镜像下载下来。 2.创建并运行容器 docker run --name MSSQL_1433 -m 512m -e ' ACCEPT_EULA=Y ' -e ' SA_PASSWORD=yourStrong(!)Password ' -p 1433 : 1433 -d microsoft/mssql-server-linux 这个密码需要复杂密码,要有大小写和特殊符号,替换yourStrong(!)Password成你自己的密码就行。如果只Linux服务器,可以不用端口映射,直接使用宿主模式 docker run --name MSSQL_1433 -m 512m -e ' ACCEPT_EULA=Y ' -e ' SA_PASSWORD=yourStrong(!)Password ' --net=host -d microsoft/mssql-server-linux 3.登入容器 docker exec -it MSSQL_1433 /bin/bash 4.连接到sqlcmd /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P ' yourStrong(!

java tesseract error in linux “Unable to load library 'tesseract': libtesseract.so”

青春壹個敷衍的年華 提交于 2021-02-18 17:49:55
问题 I am using tess4J ocr library in eclipse and is working fine in my windows. But when i want to run that java program in linux it is giving an error "Unable to load library 'tesseract': libtesseract.so: cannot open shared object file: No such file or directory". I dont have any permissions on linux to install the tesseract or any other software . Just i can use the jar files and run the java program by calling the shell script.Please help me on this . As I am thinking my problem will be solved

MongoDB增删改查

前提是你 提交于 2021-02-18 17:40:28
一:启动mongodb 1、linux系统(Ubuntu):sudo server mongodb start 2、window系统:mongod,启动之后不能关闭cmd窗口,必须挂起 二:运行mongodb 命令:mongo 三、创建数据库 使用use 命令创建数据库----有就切换,没有就创建数据库 命令:use 数据库名 切换数据库 命令:use 数据库名 eg: 查看当前数据库: 查看所有数据库 销毁数据库 四:创建集合 在 MongoDB 中,一个数据库包含多个集合,类似于 MySQL 中一个数据库包含多个表;一个集合包含多个文档,类似于 MySQL 中一个表包含多条数据。 可以把集合记为表,文档记为一条记录。 命令:db.createcolleciton("school") 查看所有集合: 命令:show collections 五:插入数据 插入数据有两个命令 命令:db.school.insert() 命令:db.school.save() insert 和 save 的区别:为了方便记忆,可以先从字面上进行理解,insert 是插入,侧重于新增一个记录的含义;save 是保存,可以保存一个新的记录,也可以保存对一个记录的修改。因此,insert 不能插入一条已经存在的记录,如果已经有了一条记录(以主键为准),insert 操作会报错,而使用 save

combine two audio files with a command line tool

这一生的挚爱 提交于 2021-02-18 17:36:21
问题 I've to merge two (or more) audio files (like a guitar and a drum track) into a single file. I'm running over linux CentOS and I'd need a command line tool to do so, because I've got to run this as part of a background process, triggered via crontab of a custom bash script. I also need to be able to change the pan, volume, trim and start time (i.e I want the guitar track to start after 1.25ms after the drum track so that they can be both in sync with each other). My first choice would be